Look at these lines in this NUSPEC file:
They were added because we observed some very unusal behavior. Specifically, note that the libraries are all platform specific (other than portable-win81+wpa81). Without the highlighted lines, this is the observable behavior when referencing this NuGet package:
- It would link against the platform-specific library (e.g., lib\net45\xunit.execution.desktop.dll)
- It would pull the dependency list from "dotnet", some of which are clearly not net45 compatible (e.g., System.Runtime 4.0.20)
We originally had a TF-less group, which we assumed would be used by anybody who wasn't "dotnet" or "dnx46":
This was later replaced with the duplicated TF-specific groups to prevent the broken behavior.
My expectation of the correct behavior would be that once a target framework is chosen for the library (or reference), that it would use that exact target framework for dependency selection as well, falling back to the TF-less group when there wasn't one specifically for the target framework.