121

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).

Is this link the appropriate link for the SDK, or is this just the runtime? If not, where is the link for the 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.

dewald
  • 4,633
  • 7
  • 33
  • 40

3 Answers3

107

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

For 32-bit:

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

For 64-bit:

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

KMoraz
  • 13,655
  • 3
  • 46
  • 79
Frederik
  • 2,811
  • 1
  • 14
  • 26
  • Did you install just the 4.0 SDK or Visual Studio 2010? Also, did you install the newly released final build this week? – dewald Apr 15 '10 at 01:41
  • 28
    I installed the final version of the the frameworkthat came out this week (April 12th). So, not the SDK nor Visual Studio. To get MSBuild, you don't need the SDK - just the full 4.0 Framework (not the client profile) http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7 – Frederik Apr 16 '10 at 17:02
  • Will installing just the 4.0 framework allow you to use MSBuild to build applications targeting the .NET Framework 3.5? – jpierson Dec 23 '10 at 21:23
  • I'm curious is if the .NET Framework alone includes development tools like editbin which are necessary for many build servers? These tools do seem to be included in the Windows SDK. – jpierson Jan 25 '11 at 19:33
  • editbin lives in visual studio folders, so unlikely that it comes in the framework. – Frederik Mar 09 '12 at 12:35
  • I'm also curious. I guess you couldn't use this version of MSBuild to compile e.g. C++ code, right? That would (assumably) require the full Windows 7 SDK, I guess. – Per Lundberg Oct 22 '13 at 17:58
  • Per: No (see http://stackoverflow.com/questions/857355/how-to-compile-a-program-using-net-framework-compilers-at-command-line) but it does come with vbc.exe (VB.NET) and jsc.exe (JScript) – Frederik Nov 25 '13 at 18:06
68

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

Microsoft Windows SDK for Windows 7 and .NET Framework 4

UPDATE: Based off of a blog posts on the Windows SDK Blog the 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.

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.

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.

jpierson
  • 13,736
  • 10
  • 94
  • 137
  • Beware that if you are trying to publish a ClickOnce app there are some other hacks that you will have to do to get this working with the Windows SDK. http://stackoverflow.com/questions/3567543/issue-with-clickonce-bootstrapper-and-msbuild/4796972#4796972 – jpierson Jan 25 '11 at 19:31
  • 2
    What FrederikB pointed out was that MSBuild is installed with the full .NET Framework, you apparently do not need this SDK at all. – galaktor May 23 '11 at 14:26
  • @galaktor - This is true and is what I mentioned in my third update above. There may be other things included in the SDK that may be important to many people such as ClickOnce prerequisites and other such tools that normally come along with Visual Studio. I have also recognized that there are different registry settings to different tools folders depending on whether you have using Visual Studio or just the Windows SDK installed and I'm assuming there are also a bunch of other special cases for when you are running just with the full .NET Framework installed. – jpierson May 23 '11 at 16:26
  • 12
    It should be noted that the latest Windows SDK (for .NET 4.5 and Windows 8) does not contain MSBuild anymore. If you want to compile solutions with C++ projects from the command line, you must install Visual Studio (at least express). See here: http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx – Doron Yaacoby Oct 09 '12 at 08:53
  • After installing SDK and .NET as from another post I still don't get `MSBuild.exe`. If somebody can create a small archive & share it, I will appreciate. – dma_k Jun 24 '13 at 18:18
  • 11
    For .NET 4.5.1 / MSBuild 12, there is a standalone build tools distrib: http://www.microsoft.com/en-us/download/details.aspx?id=40760. See VS blog for details: http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx. – David Tchepak Nov 07 '13 at 06:14
0

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

Hainan Zhao
  • 1,453
  • 14
  • 14