.net 在没有 Visual Studio 2010 的情况下安装 MSBuild 4.0

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

Installing MSBuild 4.0 without Visual Studio 2010

.netvisual-studio-2010msbuildsdk.net-4.0

提问by dewald

I installed .NET 4.0 and VS 2010 RC on my laptop and MSBuild was automatically installed. I was hoping to build a continuous integration server by just installing the .NET SDK without VS 2010, so I downloaded the .NET 4.0 Framework from Microsoft at this link. Unfortunately, it doesn't appear to have installed MSBuild with this download (or at least I can't find it).

我在笔记本电脑上安装了 .NET 4.0 和 VS 2010 RC,并自动安装了 MSBuild。我希望通过安装 .NET SDK 而无需 VS 2010 来构建持续集成服务器,因此我在此链接上从 Microsoft 下载了 .NET 4.0 Framework 。不幸的是,它似乎没有通过此下载安装 MSBuild(或者至少我找不到它)。

Is this link the appropriate link for the SDK, or is this just the runtime? If not, where is the link for the SDK?

此链接是 SDK 的适当链接,还是只是运行时?如果没有,SDK 的链接在哪里?

I kind of doubt it is the entire SDK as it is only 35MB where the .NET 3.5 SP1 download was over 200MB.

我有点怀疑它是整个 SDK,因为它只有 35MB,而 .NET 3.5 SP1 下载超过 200MB。

采纳答案by jpierson

Perhaps this is the SDK disguised slightly as a Windows 7 SDK.

也许这是 SDK 稍微伪装成 Windows 7 SDK。

Microsoft Windows SDK for Windows 7 and .NET Framework 4

适用于 Windows 7 和 .NET Framework 4 的 Microsoft Windows SDK

UPDATE:Based off of a blog posts on the Windows SDK Blogthe SDK that I linked to above seems to contain msbuild and supports building managed (.NET) applications. I'm assuming this is the SDK we have all been looking for in order to install on our build servers so I'm downloading it now and I'll post any further findings after I check it out.

更新:基于Windows SDK 博客上的博客文章,我上面链接的 SDK 似乎包含 msbuild 并支持构建托管 (.NET) 应用程序。我假设这是我们一直在寻找的 SDK,以便安装在我们的构建服务器上,所以我现在正在下载它,我会在检查后发布任何进一步的发现。

UPDATE:I can confirm that the link provided above does indeed install MSBuild along with other portions of what would constitute an SDK for .NET 4.0. I'm successfully using this on my build machine now without installing Visual Studio 2010 to build our project.

更新:我可以确认上面提供的链接确实安装了 MSBuild 以及构成 .NET 4.0 的 SDK 的其他部分。我现在在我的构建机器上成功地使用了它,而无需安装 Visual Studio 2010 来构建我们的项目。

UPDATE:Please also see FrederikB's answer below as it appears that the whole SDK may not be required to get MSBuild 4.0. This would be especially useful if you need to set up a minimal build server. I haven't confirmed whether this works for me or not but it would be worth a try before installing the SDK.

更新:另请参阅下面 FrederikB 的回答,因为看起来可能不需要整个 SDK 来获取 MSBuild 4.0。如果您需要设置最小的构建服务器,这将特别有用。我还没有确认这是否对我有用,但在安装 SDK 之前值得一试。

回答by Frederik

If you're looking for msbuild, you'll find that for 4.0 it's at:

如果您正在寻找 msbuild,您会发现 4.0 位于:

For 32-bit:

对于 32 位:

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

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

For 64-bit:

对于 64 位:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe

回答by Hainan.Z

Using the .Net default MsBuild may not be enough. You can download the free MsBuild Tools for Visual studio here, and install all the dependencies used in your project. enter image description here

使用 .Net 默认的 MsBuild 可能还不够。您可以在此处下载 Visual Studio 的免费 MsBuild 工具,并安装项目中使用的所有依赖项。 在此处输入图片说明