Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Order of precedence for NuGet packages that support multiple target frameworks

$
0
0

I have a NuGet package that supports multiple target frameworks net45 and netstandard2.0. There are differences in the code for the target frameworks (conditional compilation).

If I reference this package from a .NET Framework 4.6.1 application, it appears to choose the net45 version over the netstandard2.0 version, though it is nominally compatible with both.

What are the precedence rules that determine this choice? Will the choice be the same for applications built for later .NET Frameworks (4.7.2, 4.8, ...)?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>