How do I force MSBuild to compile for 32-bit mode?

前端 未结 8 1252
谎友^
谎友^ 2020-12-30 20:04

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

相关标签:
8条回答
  • 2020-12-30 20:58

    For MSBuild version 15 it is /p:PlatformTarget=x86

    0 讨论(0)
  • 2020-12-30 21:01

    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>
    
    0 讨论(0)
提交回复
热议问题