What's the difference between Bin/MSBuild.exe and Bin/amd64/MSBuild.exe
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 日
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:
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:
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.
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.
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.
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 发布者: 15.09.2017 07:16