What's the difference between Bin/MSBuild.exe and Bin/amd64/MSBuild.exe

msbuild visual-studio-2017

1170 观看

1回复

15 作者的声誉

I was looking for MSBuild.exe, and I found it in two slightly different places:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\MSBuild.exe

What's the difference between them and which should I use?

作者: Valerii Gruu 的来源 发布者: 2017 年 9 月 15 日

回应 1


2

28285 作者的声誉

决定

What's the difference between them?

The MSBuild.exe has two versions, 32-bit and 64-bit.

On 32-bit machines, the MSBuild.exe exists in the path: C:\Program Files\..\..\Bin\MSBuild.exe

On 64-bit machines, there are two version of MSBuild.exe tool. The 32-bit tools will be under: Bin\MSBuild.exe and the 64-bit tools under: Bin\amd64\MSBuild.exe

If you want to know some differences between these two versions, you can refer to the blog: Building on Cross targeting scenarios and 64-bit MSBuild.

which should I use?

To answer this question, you should to know the differences between 32-bit program and 64-bit program. You can refer this document for detail.

  1. If the assembly is configured for Any CPU then it will run as x64 on a 64-bit machine and as x86 on a 32-bit machine.

  2. If the assembly is configured for x86 then it will run as WOW64 on a 64-bit machine (i.e. a 32-bit process) and as x86 on a 32-bit machine.

  3. If the assembly is configured for x64 then it will run as x64 on a 64-bit machine and will fail to run on a 32-bit machine

So you should use Bin/MSBuild.exe, which can be run on 64-bit machine and as x86 on a 32-bit.

Besides, Visual Studio build is equivalent to running 32-bit MSBuild.

作者: Leo Liu-MSFT 发布者: 2017 年 9 月 15 日
来自类别的问题 :
32x32