windows 在 Visual Studio 2010 中找不到 msbuild.exe

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8730919/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 09:04:45  来源:igfitidea点击:

Can't find msbuild.exe in visual studio 2010

windowsvisual-c++msbuild

提问by Ivan Pericic

I'm trying to compile windows project from visual studio 2010 (64) on windows 7 in c++ from command line, but I can't find msbuild.exe, where is it?

我正在尝试从命令行用 c++ 在 windows 7 上从 Visual Studio 2010 (64) 编译 windows 项目,但我找不到msbuild.exe,它在哪里?

回答by Jon Skeet

It should be installed as part of .NET 4... so for example, in

它应该作为 .NET 4 的一部分安装......例如,在

c:\Windows\Microsoft.NET\Framework\v4.0.30319

... but if you start a "Visual Studio Command Prompt" instead of just running cmd, it should be in the path already. That's what I'd suggest you do - I always have Visual Studio Command Prompt as a shortcut pinned to my task bar; I have no reason to launch a command prompt which doesn'thave the relevant path :)

...但是如果您启动“Visual Studio 命令提示符”而不是仅运行 cmd,它应该已经在路径中。这就是我建议你做的 - 我总是将 Visual Studio 命令提示符作为固定到我的任务栏的快捷方式;我没有理由启动没有相关路径的命令提示符:)

回答by Colonel Panic

As of 2013 msbuild ships with Visual Studio:

截至 2013 年,msbuild 随 Visual Studio 一起提供

  • C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
  • C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe
  • C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
  • C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe

Before that msbuild shipped with the .NET Framework, up to version 4.5.1:

在 msbuild 随 .NET Framework 一起提供之前,最高版本为 4.5.1:

  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe