Devenv ProjectConfig开关 - Win32和x64

rut*_*ike 3 visual-studio-2008 visual-studio

以交互方式运行Visual Studio 2008,我可以为x64和Win32目标成功构建项目.但是,如果我调用devenv,无论我的/ projectconfig参数如何,它总是执行x64构建:

devenv /Rebuild Release MySolution.sln /projectconfig "Release|Win32"

Microsoft (R) Visual Studio Version 9.0.21022.8.
Copyright (C) Microsoft Corp. All rights reserved.
------ Rebuild All started: Project: my-project, Configuration: Release x64 ------
Run Code Online (Sandbox Code Playgroud)

请注意/ projectconfig arg与Configuration:输出不匹配.我错过了一些简单的事吗?它在IDE中工作正常,但有一堆目标,我更喜欢编写脚本.

提前致谢!

the*_*ill 9

我不确定为什么会发生这种情况,但它是否适用于以下情况?

devenv /Rebuild "Release|Win32" MySolution.sln 
Run Code Online (Sandbox Code Playgroud)

或者,使用msbuild:

msbuild MySolution.sln /p:Configuration=Release;Platform=Win32 /t:proj:Rebuild
Run Code Online (Sandbox Code Playgroud)