.net 使用 BuildTools_Full.exe 安装时,MSBuild.exe 安装在 Windows 中的什么位置?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44567280/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is MSBuild.exe installed in Windows when installed using BuildTools_Full.exe?
提问by jonasm
I'm trying to set up a build server for .NET, but can't figure out where MSBuild.exe is installed.
我正在尝试为 .NET 设置构建服务器,但无法确定 MSBuild.exe 的安装位置。
I'm trying to install MSBuild using the Microsoft Build Tools 2013: https://www.microsoft.com/en-us/download/details.aspx?id=40760
我正在尝试使用 Microsoft Build Tools 2013 安装 MSBuild:https: //www.microsoft.com/en-us/download/details.aspx?id=40760
回答by Aniket Thakur
As per https://docs.microsoft.com/en-us/visualstudio/msbuild/what-s-new-in-msbuild-15-0
根据https://docs.microsoft.com/en-us/visualstudio/msbuild/what-s-new-in-msbuild-15-0
MSBuild is now installed in a folder under each version of Visual Studio. For example,
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild. You can also use the following PowerShell module to locate MSBuild: vssetup.powershell.MSBuild is no longer installed in the Global Assembly Cache. To reference MSBuild programmatically, use NuGet packages.
MSBuild 现在安装在每个版本的 Visual Studio 下的文件夹中。例如,
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild。您还可以使用以下 PowerShell 模块来定位 MSBuild:vssetup.powershell。MSBuild 不再安装在全局程序集缓存中。若要以编程方式引用 MSBuild,请使用 NuGet 包。
回答by MaGnumX
MSBuild in the previous versions of .NET Framework was installed with it but, they decided to install it with Visual Studio or with the package BuildTools_Full.exe.
之前版本的 .NET Framework 中的 MSBuild 是随它一起安装的,但是,他们决定使用 Visual Studio 或 BuildTools_Full.exe 包安装它。
The path to MSBuild when installed with the .NET framework:
与 .NET 框架一起安装时 MSBuild 的路径:
C:\Windows\Microsoft.NET\Framework[64 or empty][framework_version]
C:\Windows\Microsoft.NET\Framework[64 或空][framework_version]
The path to MSBuild when installed with Visual Studio is:
与 Visual Studio 一起安装时 MSBuild 的路径是:
C:\Program Files (x86)\MSBuild[version]\Bin for x86 and, C:\Program Files (x86)\MSBuild[version]\Bin\amd64 for x64.
C:\Program Files (x86)\MSBuild[version]\Bin for x86 和 C:\Program Files (x86)\MSBuild[version]\Bin\amd64 for x64。
The path when BuildTools_Full.exe is installed is the same as when MSBuild is installed with Visual Studio.
BuildTools_Full.exe 的安装路径与 MSBuild 与 Visual Studio 安装时的路径相同。
回答by Ev.
Open the Microsoft command line. I'm using Visual Studio 2019, so my command line is "Developer Command Prompt for VS 2019".
打开 Microsoft 命令行。我使用的是 Visual Studio 2019,所以我的命令行是“VS 2019 的开发人员命令提示符”。
Then run the command:
然后运行命令:
where msbuild
And the path will be echo'd.
并且路径将被回显。
回答by Karvan
You can find the VS2019 here : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
你可以在这里找到 VS2019:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe

