I\'m using MSBuild (via NAnt) to compile a bunch of VB.NET assemblies. Because these assemblies depend on COM Interop, I need to guarantee that they run in 32-bit mode on 64
For MSBuild version 15 it is /p:PlatformTarget=x86
If the assemblies themselves are always going to be 32 bit, why not add the setting to the .vbproj file? That will take MSBuild out of the equation.
Just add the following line to the initial PropertyGroup in the .vbproj file
<PlatformTarget>x86</PlatformTarget>