NuGet.targets does not pass $(Platform) to nuget pack


I can provide a formal patch, but basically Line 55:

<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>

Needs to become:

<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>

If I am on the command line and the environment variable Platform is set to x64, but I pass Platform=AnyCPU to msbuild like this

msbuild OrcaMDF.Core.csproj /p:Platform=AnyCPU /t:Clean;Build

Then the nuget pack call will use the environment variable value of platform.
Closed Aug 17, 2014 at 3:33 PM by JeffHandley


dotnetjunky wrote May 2, 2013 at 12:36 AM

Sure, please go ahead and submit a pull request. Thanks for filing bug.

feiling wrote Jan 6, 2014 at 11:24 PM

Fixed in changeset 811e1c1582d66457b7a9953c905729e71ea8570c