Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 201
Ursus Schneider Avatar asked May 23 '18 06:05

Ursus Schneider


People also ask

How to update netcoreapp2 to the latest version?

Open your project's csproj file and update netcoreapp2.0 to netcoreapp2.1 and while you're at it you can update the "Microsoft.AspNetCore.All" to version 2.1. This will save you from having to update the nuGet package. Worked for me. Best of luck.

What is the latest version of NET Core?

.NET Core 2.1 has been refreshed with the latest update as of May 11, 2021. This update contains reliability and other non-security fixes. See the release notes for details on updated packages.

What version of ASP NET Core do I need to update?

If targeting .NET Framework, update each package reference's Version attribute to 2.2.0 or later. Here are the package references in a typical ASP.NET Core 2.2 project targeting .NET Framework: If referencing the Microsoft.AspNetCore.Razor.Design package, update its Version attribute to 2.2.0 or later.

What happened to Microsoft Netcore app?

Microsoft. NETCore. App 2.1.0 Prefix Reserved This package has at least one vulnerability with high severity. It may lead to specific problems in your project. Try updating the package version. This package has been deprecated as it is legacy and is no longer maintained.


1 Answers

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.

like image 195
CodeNotFound Avatar answered Oct 27 '22 09:10

CodeNotFound