Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet.exe pack ignores pack=false #17559

Open
DJDoena opened this issue Oct 18, 2023 · 0 comments
Open

dotnet.exe pack ignores pack=false #17559

DJDoena opened this issue Oct 18, 2023 · 0 comments

Comments

@DJDoena
Copy link

DJDoena commented Oct 18, 2023

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 DJDoena changed the title dotnet.exe pack ignores pack=false dotnet.exe pack ignores pack=false Oct 18, 2023
@DJDoena DJDoena changed the title dotnet.exe pack ignores pack=false dotnet.exe pack ignores pack=false Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant