Pack does not identify net6.0-windows as TargetFramework
Description
When building "net6.0-windows" targeted projects, paket pack will not include the dll of that build in the nuget package. When targeting "net6.0-windows7.0", it works.
Since paket.dependencies handles net6.0-windows alias properly, pack should do the same.
Found in version
The issue is present in the current 7.1.5 version.
Repro steps
-
Target a project to net6.0-windows
-
Build the project and create package using paket pack
-
Note that there is not net6 dll in lib folder of the nuget package.
Expected behavior
If paket resolves net6.0-windows to the latest version that is net6.0-windows7.0 as of now, it should package the net6.0-windows build into that resolved version too.
Another solution would be to add a warning/error message about recognizing the issue and suggesting the explicit targeting
Actual behavior
When building against net6.0-windows, no dll will be included in the package and nor will there be any warnings
Known workarounds
Explicitly building against net6.0-windows7.0 is working just fine.
See also https://github.com/dotnet/sdk/issues/14553#issuecomment-737530880 - I think the quote there shows that also Microsoft and nuget people got confused:
TFM has an OS but no OS version. If the user omits the OS version number from the project's <TargetFramework> property, all usages of the TFM should not contain an OS version number, including the project's output directory, the lib folder in the NuGet package, and other corresponding entries in the .nuspec. However, the effective OS version will be recorded in the .nuspec's <platform> element that corresponds to the TFM.
Could we get an update on this? For us its a decision if we really need to hardcode "7.0" variant everywhere, since currently if we omit it, consumers of such nuget packages cannot consume them if Paket is being used.