简体   繁体   中英

Default platform in msbuild

My solution App.sln has specified only configuration Debug|x86 and Release|x86 . When building this solution in my computer, it works fine, but when building in another developer's computer, it raises an error saying that it doesn't exist configuration Release|x64 in the solution. The problem is that I never set the platform when calling msbuild. Like this:

msbuild.exe App.sln

The computers have the same configuration (x86, WinXP).

How can I enforce or set the platform system-wide?

Edit 2012-12-20: It isn't possible for us to change all projects to allow both platforms or even Any CPU. We only release x86 binaries (due compatibility with external libraries). The question is basically if there is a global variable setting the platform.

Edit 2012-12-21: Vlad L answered the correct way to enforce the build using the platform desired. But in case someone else find the same problem, I created a new workspace in TFS and it solved the issue. Investigating it further, I discovered it was a cache error in workspace.

1) msbuild.exe /property:Configuration=Debug;Platform=x64 App.sln

2) Right mouse on Solution -> Properties -> configuration Properties -> button Configuration Manager. Set checkbox for all projects and then you can create new or change existing configuration or target platform for all projects at once (Checked in Visual Studio 2012)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM