Reputation: 11
I was trying to install the MathNet.Numerics package to my project (a class library), when I got this error:
The NuGet operation failed due to one or more packages being incompatible with your project. The '.NETPlatform,Version=v5.0' ('dotnet') project framework is deprecated. For more information about how to migrate your projects to a supported framework, please refer to themigration document (https://aka.ms/rugr4c). Would you like to continue with the project action(s) anyways?
This error also occured when I tried to update the Microsoft.NETCore.Portable.Compatibility package. Does anybody know what is causing this issue? I don't quite get what the error is saying even after some research, and I couldn't find anyone else with this issue. Thanks.
Upvotes: 0
Views: 352
Reputation: 76986
The nuget operation failed due to one or more packages being incompatible with your project
That because in the Visual Studio 2017 15.3:
You had two ways to target
.NET Standard
: one was via letting a PCL target .NET Standard. The other was via the new.NET Standard
project type. NuGet team disabled the UI for letting a PCL target.NET Standard
because it never worked well. It sounds like we’ve accidentally broken something else that affects existing projects.However, you can use the
.NET Standard
project type, i.e. File | New Project | .NET Standard | Class Library (.NET Standard) to target .NET Standard 1.x/2.x, which can still be consumed from .NET Core 1.x/2.x.
Check the blog Announcing .NET Standard 2.0 for some details
Hope this helps.
Upvotes: 1