How to upgrade to .NETStandard 2.0 NuGet package

I have a nice old .NET Framework 4.7 class library in Visual Studio 2015, currently using Microsoft.Extensions.ConfigurationNuGet version 1.1.2 . I am trying to update this to version 2.0 , but I am getting this error:

Microsoft.Extensions.Configuration 2.0.0 '. You are trying to install this package in a project that targets ".NETFramework, Version = v4.7", but the package does not contain links to assemblies or content files compatible with this infrastructure. For more information, contact the author of the package.

I see that the new version only supports .NETStandard 2.0. Should I convert my entire project to .NET Core or .NET Standard in Visual Studio 2017?

+6
source share
2 answers

.NET Framework versions 4.6.1 and higher support .NET Standard 2.0+, but only when using the new tools. Make sure that you have upgraded VS 2017 version 15.3.0 or higher and installed the .NET Core SDK 2.0.0, and not global.jsonin the solution directory hierarchy where the lower version of the SDK was installed.

You may also need to set the .NET Core workload in VS 2017

+6
source

Yes, you need to convert your project to .Net standard 2.0 in order to use the Microsoft.Extensions.Configuration 2.0.0 package.

.Net standard 2.0.Net framework .Net 2.0 .Net framework 4.6.1

. 2.0 api

+3

All Articles