Failed to install 'Microsoft.Extensions.Configuration 2.0.0'

I am trying to install Serilog.Sinks.MSSqlServer through Nuget. Using VS 2013 and .Net framework is 4.7.2. I checked dependencies before installing and it says it's compatible with framework 4.7.2. But i get below error and installation gets rollback.

"Could not install package 'Microsoft.Extensions.Configuration 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework" Am I missing something?

2 answers

  • answered 2020-10-16 05:54 C. Augusto Proiete

    Microsoft.Extensions.Configuration 2.0.0 targets only .NET Standard 2.0 (which indeed is compatible with .NET Framework 4.7.2).

    However, support for the netstandard moniker for VS 2013 was only introduced in NuGet v2.12.

    My guess is that you have an old version of the NuGet extension installed on your Visual Studio 2013. Make sure you update it to VS 2013 VSIX v2.12.0.

    Alternatively, you can use the NuGet CLI tool to install the package instead of Visual Studio.

    ps: You should consider upgrading Visual Studio to 2019, if possible.

  • answered 2020-10-16 06:49 Manjunatha DL

    Update the Visual Studio 2013 to latest version and try