简体   繁体   中英

Microsoft.NETCore.App update to 2.1.0-rc problems

I am very new to .NET programming with C# and now have a problem that I cannot seem to fix no matter what I do. I would like to create an App using .NET Core and Entity Framework. I create a new application in Visual Studio (the newest version) and select C#/ASP.NET Core Web Application and then API on the second window. At the top of the window I cannot select ASP.NET Core 2.1 yet (only 2.0) but I need 2.1 to be able to use Views in EF.

I then go to NuGet package manager and see that Microsoft.AspNetCore.All is at version 2.0.8 . I try and update this to 2.1.0-rc1-final but that rolls back and says that Microsoft.NETCore.App does not support 2.1 -> when I try and update Microsoft.NETCore.App I see " blocked by project ". To get around the .NetCore.App problem I issued this command:

Install-Package Microsoft.NETCore.App -Version 2.1.0-rc1

Now I am at 2.1.0-rc1 for Microsoft.NETCore.App , cool. I now try and update (using NuGet Package Manager) but still get the error message:

Package Microsoft.AspNetCore.All 2.1.0-rc1-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.All 2.1.0-rc1-final supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)

Even though Microsoft.NETCore.App is already at 2.1.0-rc1 . Trying to update Microsoft.AspNetCore.All to 2.1.0.rc1-final using the Package Manager Console command:

Install-Package Microsoft.AspNetCore.All -Version 2.1.0-rc1-final

I get the same error as when trying to do it via NuGet Package Manager.

Any ideas as to how I can get this to work?

Based on your error:

Package Microsoft.AspNetCore.All 2.1.0-rc1-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.All 2.1.0-rc1-final supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)

You need to install .NET Core 2.1 SDK. To get it go to this page , download and install the adequate package for your OS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM