Installing MSBuild 4.0 without Visual Studio 2010

96,539

Solution 1

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.

UPDATE (Feb 2022): Most recently when I needed to work with msbuild for an older .NET Framework project I was able to do so using the Build Tools for Visual Studio. The most recent version at the time of this update can be found at the Download page for Visual Studio itself. Look for Build Tools for Visual Studio 2022 under the section labeled Tools for Visual Studio 2022. Obviously the modern equivalent in the age of .NET 6 is to use the universal .NET SDK which includes the dotnet cli tool as a big improvement over MSBuild and in some cases can still be used to build certain .NET Framework projects.

Solution 2

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

Share:
96,539
TNC
Author by

TNC

Updated on February 10, 2022

Comments

  • TNC
    TNC over 2 years

    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.

  • TNC
    TNC about 14 years
    Did you install just the 4.0 SDK or Visual Studio 2010? Also, did you install the newly released final build this week?
  • Frederik
    Frederik about 14 years
    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) microsoft.com/downloads/…
  • jpierson
    jpierson over 13 years
    Will installing just the 4.0 framework allow you to use MSBuild to build applications targeting the .NET Framework 3.5?
  • jpierson
    jpierson over 13 years
    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. stackoverflow.com/questions/3567543/…
  • jpierson
    jpierson over 13 years
    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.
  • galaktor
    galaktor almost 13 years
    What FrederikB pointed out was that MSBuild is installed with the full .NET Framework, you apparently do not need this SDK at all.
  • jpierson
    jpierson almost 13 years
    @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.
  • Frederik
    Frederik about 12 years
    editbin lives in visual studio folders, so unlikely that it comes in the framework.
  • Doron Yaacoby
    Doron Yaacoby over 11 years
    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: msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx
  • dma_k
    dma_k almost 11 years
    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.
  • Per Lundberg
    Per Lundberg over 10 years
    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.
  • David Tchepak
    David Tchepak over 10 years
    For .NET 4.5.1 / MSBuild 12, there is a standalone build tools distrib: microsoft.com/en-us/download/details.aspx?id=40760. See VS blog for details: blogs.msdn.com/b/visualstudio/archive/2013/07/24/….
  • Frederik
    Frederik over 10 years
    Per: No (see stackoverflow.com/questions/857355/…) but it does come with vbc.exe (VB.NET) and jsc.exe (JScript)