You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When packing a project with a target platform, when the target platform version is not included in the .csproj (but a platform is), the lib files are pulled in using the "alias".
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): All of the above
Worked before? If so, with which NuGet version: no
Detailed repro steps so we can see the same problem
mkdir nuget-repro && cd nuget-repro && dotnet new wpflib
dotnet pack
look in the .nupkg lib directory
Result
We get a facefull of warnings:
❯ dotnet pack
Microsoft (R) Build Engine version 16.8.0-preview-20451-02+51a1071f8 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
All projects are up-to-date for restore.
You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
bar -> C:\Users\kmarchan\src\bar\bin\Debug\net5.0-windows\bar.dll
C:\Program Files\dotnet\sdk\5.0.100-rc.1.20454.5\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): warning NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below: [C:\Users\kmarchan\src\bar\bar.csproj]
C:\Program Files\dotnet\sdk\5.0.100-rc.1.20454.5\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): warning NU5128: - Add a dependency group for net5.0-windows to the nuspec [C:\Users\kmarchan\src\bar\bar.csproj]
C:\Program Files\dotnet\sdk\5.0.100-rc.1.20454.5\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): warning NU5128: - Add lib or ref assemblies for the net5.0-windows7.0 target framework [C:\Users\kmarchan\src\bar\bar.csproj]
Successfully created package 'C:\Users\kmarchan\src\bar\bin\Debug\bar.1.0.0.nupkg'.
...and it's using net5.0-windows instead of net5.0-windows7.0.
The text was updated successfully, but these errors were encountered:
dominoFire
changed the title
Dotnet Pack mistakenly uses alias for WPF Library projectsdotnet pack mistakenly uses alias for WPF Library projects
Nov 10, 2020
When packing a project with a target platform, when the target platform version is not included in the .csproj (but a platform is), the lib files are pulled in using the "alias".
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): All of the above
dotnet.exe --version (if appropriate): 5.0.100-rc.1.20454.5
VS version (if appropriate): 16.8.4-pre.4.0
OS version (i.e. win10 v1607 (14393.321)): win10
Worked before? If so, with which NuGet version: no
Detailed repro steps so we can see the same problem
Result
We get a facefull of warnings:
...and it's using
net5.0-windows
instead ofnet5.0-windows7.0
.The text was updated successfully, but these errors were encountered: