This is a migrated thread and some comments may be shown as answers.

Cannot access EntityFrameworkCore

1 Answer 297 Views
Installer and VS Extensions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 27 Sep 2020, 08:37 PM
I've previously used VS2012 and struggling to learn VS2019 and ASP.NET Core. I've perhaps made the mistake of also downloading a trial version of the Telerik Core tools.

So I am trying to run through a very very simple tutorial and got to the part about Adding Entity Framework Core and then creating a data context. My system isn't recognising EntityFrameworkCore in the line using Microsoft.EntityFrameworkCore; of the context class. I've just spent a frustrating couple of hours hopelessly trying to find out where the problem is. I ended up going to the cli and trying to execute "dotnet add package Microsoft.EntityFrameworkCore --version 3.1.8" and I get 

info :   GET https://nuget.telerik.com/nuget/FindPackagesById()?id='Microsoft.EntityFrameworkCore'&semVerLevel=2.0.0
info :   OK https://nuget.telerik.com/nuget/FindPackagesById()?id='Microsoft.EntityFrameworkCore'&semVerLevel=2.0.0 599ms
error: Unable to find package Microsoft.EntityFrameworkCore. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.telerik.com

So somewhere Telerik have hijacked the nuget and it is only referencing telerik.com and not microsoft. NOT happy.

 How do I get EntityFrameworkCore in my project 

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 28 Sep 2020, 10:40 AM

Hello, Paul

Thank you for providing an example of the problem you're experiencing.

The issue is most likely occurring, because the Package Source is set to use only Telerik's nuget feed.

To fix this problem in VS 2019 navigate to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution... Then locate the Package Source on the top right corner and change it to either "All" or "nuget.org".

Or in case you're using the PM Console, also make sure the proper source is selected.

In case nuget.org is missing or is pointing to the wrong source, have a look at this discussion and the top answer:

https://stackoverflow.com/questions/52376567/how-to-resolve-unable-to-find-package-nuget-error

Let me know if you require further assistance.

Best Regards,
Georgi Denchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Installer and VS Extensions
Asked by
Paul
Top achievements
Rank 1
Answers by
Georgi Denchev
Telerik team
Share this question
or