Reputation: 14944
I've a good old .NET Framework 4.7 Class Library in Visual Studio 2015 currently using Microsoft.Extensions.Configuration
NuGet package version 1.1.2. I'm trying to update this to version 2.0, but I'm getting this error:
Microsoft.Extensions.Configuration 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I see that the new version only supports .NETStandard 2.0. Do I have to convert all my project to either .NET Core or .NET Standard in Visual Studio 2017?
Upvotes: 9
Views: 5785
Reputation: 100811
.NET Framework versions 4.6.1 and higher do support .NET Standard 2.0+, but only when using new tooling. Make sure you update to VS 2017 version 15.3.0 or higher and have the .NET Core SDK 2.0.0 installed and no global.json
in your solution's directory hierarchy pinning a lower SDK version.
You may also need to install the .NET Core workload in VS 2017
Upvotes: 6
Reputation: 739
Yes you have to convert your project to .Net standard 2.0 to use the Microsoft.Extensions.Configuration 2.0.0 package.
Check out the below link for .Net standard 2.0 supported .Net framework version as of now the, .Net standard 2.0 supports only up to .Net framework 4.6.1
.Net standard 2.0 supported api
Upvotes: 3