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, ...)?