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

前端 未结 8 1292
谎友^
谎友^ 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:39

    A more practical way i use to find the right property is by opening one of the .csproj project file (in case of c#) and see the property that is affected when you select "x64" / "AnyCPU" / "x86" from Visual stdio. Whatever property that is changed, you need to set that from command line. With Visual studio 2015 it seems to be . So you can invoke msbuild with the argument /p:Platform=x64 and it should work.

提交回复
热议问题