I have a program which must build as 32 bit. It gets shipped with an x64 application. As a result, there is an installer which gets a bitness.
The installer is built with a wixproj
that must be built with /p:Platform=x64
-- but the vcxproj
needs to build as x86.
I tried forcing Platform
to be x86
or Win32
by setting it explicitly:
<PropertyGroup>
<Platform>Win32</Platform>
</PropertyGroup>
but it appears that the command line switch that got passed to the wixproj
"wins" when building.
Is there some way that the project file can force Platform
to be Win32
no matter what is specified on the command line?
(for csproj
I was able to do this:
<PropertyGroup>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
but that doesn't have any effect on C++ it seems)
Finally figured this out. MSBuild has a setting
TreatAsLocalProperty
that allows a project file to override any variable, which goes into theProject
node at the beginning of the file.