msbuild - Bin/MSBuild.exe 和 Bin/amd64/MSBuild.exe 有什么区别

标签 msbuild visual-studio-2017

was looking for MSBuild.exe ,我在两个稍微不同的地方找到了它:

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?



MSBuild.exe 有两个版本,32 位和 64 位。

在 32 位机器上 , MSBuild.exe 存在于路径:C:\Program Files\..\..\Bin\MSBuild.exe
在 64 位机器上 ,有两个版本的 MSBuild.exe 工具。 32 位工具将位于:Bin\MSBuild.exe以及以下 64 位工具:Bin\amd64\MSBuild.exe
如果想了解这两个版本的一些区别,可以引用博客:Building on Cross targeting scenarios and 64-bit MSBuild .

which should I use?



要回答这个问题,您应该了解 32 位程序和 64 位程序之间的区别。您可以引用this document详情。

  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



所以你应该使用 Bin/MSBuild.exe ,它可以在 64 位机器上运行,也可以在 32 位机器上作为 x86 运行。

此外,Visual Studio 构建相当于运行 32 位 MSBuild。

关于msbuild - Bin/MSBuild.exe 和 Bin/amd64/MSBuild.exe 有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46232442/

相关文章:

c# - 从 C# 运行 Microsoft.Build.Evaluation.Project 的并行构建

tfs - 在 TFS 构建中修改 web.config 中的设置

.net - MSBuild:通过 Zip/Copy 任务添加/复制空文件夹

visual-studio-2010 - Visual Studio 2010 中的 "Error MSB3073"- 构建后命令不处理换行符?

c# - RDLC 报告在将 Visual Studio 2015 更改为 Visual Studio 2017 后停止工作

visual-studio - VS2017 RTM 在键入 Typescript 导入/导出时非常缓慢

msbuild - TeamCity:如何告诉 MSBuild 考虑发布配置文件参数?

c# - Visual Studio 2017 社区版上的类图在哪里

c# - Angular http获取使用c#.Net

c# - 为什么在一个空的 "while"循环中没有关于可能错误的空语句的警告?