I'd like to create ONE NuGet package containing two builds with different platform (x86 and x64).
I've found a solution doing it by using "nuget.exe MyProject.nuspec". But since my project has many dependencies, writing the .nuspec manually is complex and prone to errors.
A much cleaner way is to use "dotnet pack MyProject.csproj". All dependencies are added automatically. My current approach looks like this:
msbuild MyProject.csproj -p:Configuration=Release -p:Platform="x86"
msbuild MyPeoject.csproj -p:Configuration=Release -p:Platform="x64"
dotnet pack MyProject.csproj -c Release -p:Platform="x86" --no-build -o ./
dotnet pack MyProject.csproj -c Release -p:Platform="x64" --no-build -o ./
The Result is one Package, containing the x64 build (I guess the x86 is overridden by the x64).
What I'm looking for is something like this:
msbuild MyProject.csproj -p:Configuration=Release -p:Platform="x86"
msbuild MyPeoject.csproj -p:Configuration=Release -p:Platform="x64"
dotnet pack MyProject.csproj -c Release -p:Platform="x86|x64" --no-build -o ./
Is there an argument to pack two builds into one package?