The BuildCommand property in NuGet.targets only loosely specifies the configuration of the project but forgets to set the platform.
This can cause MSBuild to fail the build with the error message: "Unable to find '{0}'. Make sure the project has been built."
Discussion thread below:
http://nuget.codeplex.com/discussions/271960
Fix
---
Replace this line in NuGet.targets:
``` xml
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
```
with this line:
``` xml
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration);Platform=$(Platform) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
```
This can cause MSBuild to fail the build with the error message: "Unable to find '{0}'. Make sure the project has been built."
Discussion thread below:
http://nuget.codeplex.com/discussions/271960
Fix
---
Replace this line in NuGet.targets:
``` xml
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
```
with this line:
``` xml
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration);Platform=$(Platform) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
```