简体   繁体   中英

Nuget package not installing in .Net Framework

I have created .net standard library project and I have created nuget package for this library, Now I need to install this package in both application.Net Core and.Net Framework4.5. Working fine in.Net Core but while installing.Net framework project it was showing below exception.

Blockquote You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', 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. Blockquote

Please let me know the right approach to resolve this.

The library that you have created targets .NET Standard 2.0, as stated in your tags. .NET Framework 4.5.2 does only implement .NET Standard up to version 1.2, that is why the assemblies are not compatible.

You should change your library to a .NET Standard version that is implemented by both .NET Core and .NET Framework or upgrade your .NET Framework version accordingly.

You can find the version mappings here , credits to @Matt Ward for providing the source.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM