There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
NuGet pack does not propagate Properties to msbuild
Steps to reproduce:
1 - Create a C# project (example.csproj) without an "AnyCPU" platform (i.e. x86 only)
2 - Create a .nuspec for the project.
3 - Using version 2.2.0, run
NuGet.exe pack example.csproj -Build -Properties Configuration=Release;Platform=x86
1 - example is built in Release/x86
2 - NuGet package is built with that output
Attempting to build package from 'example.csproj'.
Building project for target framework '.NETFramework,Version=v4.0'.
Project "W:\Source...\example\example.csproj" (default targets):
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(609,5): error : The OutputPath property is not set for project 'example.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this
project. Configuration='Debug' Platform='AnyCPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
Done building project "example.csproj" -- FAILED.
Failed to build 'example.csproj'.
ProjectFactory's BuildProject() provides only ProjectProperties to the constructor of BuildRequestData (line 283). ProjectProperties contains just one property (SolutionDir). _project.Properties contains 403 properties on my system, including Configuration
and Platform as they were set in step 3.