【发布时间】:2014-01-21 04:20:19
【问题描述】:
我有一个必须构建为 32 位的程序。它附带一个 x64 应用程序。结果,有一个安装程序有点麻烦。
安装程序使用wixproj 构建,必须使用/p:Platform=x64 构建——但vcxproj 需要构建为x86。
我尝试通过显式设置将Platform 强制为x86 或Win32:
<PropertyGroup>
<Platform>Win32</Platform>
</PropertyGroup>
但似乎在构建时传递给wixproj“wins”的命令行开关。
项目文件是否可以通过某种方式强制Platform 为Win32,无论命令行中指定什么?
(对于csproj,我能够做到这一点:
<PropertyGroup>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
但这似乎对 C++ 没有任何影响)
【问题讨论】:
-
既然你问这个,我假设你没有单独构建它们——那么你是如何构建这些项目的?它们是单一解决方案的一部分吗?您使用主构建文件?您能否展示调用构建它们的 msbuild 部分?
-
@stijn:
msbuild foo.wixproj /p:Platform=x64 /p:Configuration=Release
标签: c++ visual-studio msbuild vcxproj