Reputation: 335
I'm having serious troubles in my Web Api project. I can't install entityframework nor update any of the updates to the project. Trying to update there gives me the error "package restore failed. rolling back package changes".
First of, I can't make a project with asp net core, only with the 1.1 version even though I have the correct version installed. See these two pictures.
As you can see it is installed.
Trying to install entity framework gives me:
How can I upgrade my project to asp net core 2.0 or atleast make a new 2.0 project?
Upvotes: 1
Views: 1224
Reputation: 93273
Support for ASP.NET Core 2.0 was added in Visual Studio 2017 version 15.3 (see the original accouncement).
Your first error is due to the fact that ASP.NET Core 2.0 is not compatible with .NET Core 1.1. You'll need to target .NET Core 2.0 (netcoreapp2.0
) for this, as you've attempted to do. Upgrading to Visual Studio 2017 version 15.3 will allow you to do that, as I mentioned above.
Your second error is due to the fact that Entity Framework 6.1.3 is not compatible with .NET Core 1.1 (or, in fact, any version of .NET Core). In order to use Entity Framework in a .NET Core project, you will instead need to use Entity Framework Core (nuget). This is an entirely new version of Entity Framework, so make sure you check out the differences if you haven't already.
Upvotes: 3
Reputation: 1888
firstly check dotNetCore version
Open Command Prompt and run this dotnet --version
install dotnetCore
framework lastest on here
alternatively you can update the visual studio
Upvotes: 1