installer icon indicating copy to clipboard operation
installer copied to clipboard

dotnet.exe pack ignores pack=false

Open DJDoena opened this issue 2 years ago • 0 comments

I try to create a nuget for x86 and x64 explicit, but deliberately no AnyCPU (see https://learn.microsoft.com/en-us/answers/questions/1373133/ ). dotnet.exe pack doesn't like this and quits with

dotnet pack DoenaSoft.NugetTest\DoenaSoft.NugetTest.csproj --no-build -c=Release -o=./

error NU5026: The file '{...}\bin\Release\net472\DoenaSoft.NugetTest.dll' to be packed was not found on disk. [{...}\DoenaSoft.NugetTest.csproj]

Even when I - for the sake of argument- add an AnyCPU configuration and build it and then deliberately tell to not pack in the nuget

<None Update="bin\Release\net472\DoenaSoft.NugetTest.dll">
	<Pack>false</Pack>
</None>

that still gets ignored and get packed into the nuget spec

Sample github project and build script here: https://github.com/DJDoena/DoenaSoft.NugetTest/tree/412f3a5451c39471eaae2531b10708bfeb6fe31b

DJDoena avatar Oct 18 '23 09:10 DJDoena