One of the drawbacks of the nuspec
file is that you need to list you nuget
dependencies all over again and don't you dare forget it when updating one of your dependencies. For example here.
As a test balloon I was trying to achieve the same goal with the new Microsoft.NET.Sdk
project style.
With the help from SO here and SO here I was able to generate a nuget package if it contains x86
, x64
andAnyCPU
. But I don't want AnyCPU
.
Because for some reason the dotnet pack
command insists on finding the DLL in the default folder:
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]
And I can't convince it that I neither want nor need a non-x86
/x64
library in my nuget
pack
Github build script and everything here