Introducing the JetBrains redistributable of MSBuild

TL;DR: (Update February 12, 2020)

  1. MSBuild from Microsoft Build Tools 2017 requires a valid license of Visual Studio.
  2. JetBrains has a custom redistributable of MSBuild, built from the MIT-licensed MSBuild repository on GitHub. It can be used freely, with Rider and in other places such as a CI server/build agent.
  3. This custom MSBuild version is bundled with Rider. Configure it in the settings/preferences (under Build, Execution, Deployment | Toolset and Build) and select the bundled version:

Use bundled version of MSBuild in Rider

Over the past year, JetBrains Rider has become the primary IDE for many .NET developers. Many of our users have been asking us about how they can develop and build their applications without having Visual Studio 2017 installed. The answer is simple on macOS and on Linux, where Mono can be installed. And for .NET Core projects, all we need is the .NET Core SDK which exists for Windows, macOS and Linux.

Things get a bit more interesting when developing and building apps for the full .NET Framework on Windows… Rider will use the tools that are available after installing the Microsoft Build Tools 2017, but these come with one caveat in their license agreement: a validly licensed copy of Visual Studio is required.

Since all we need from the build tools is MSBuild, which is MIT-licensed, we are providing a JetBrains redistributable of MSBuild that can be used freely.

Once downloaded and extracted on our machine, we can configure Rider to use it. From Rider’s settings, under Build, Execution, Deployment | Toolset and Build, then Use MSBuild version, we can specify the Custom MSBuild executable we just extracted.

Set custom MSBuild version in JetBrains Rider

Our redistributable of MSBuild is built from our GitHub fork of the official MSBuild repository. We’re not planning on creating a custom MSBuild version – we just want to provide an MIT-licensed build. In case you have any PR’s, head over to the original repository by Microsoft.

Note that our redistributable excludes some of the proprietary targets files, such as Microsoft.WebApplication.targets. The Mono project does have a stub that could help here.

In summary, to use Rider to develop full .NET framework applications on Windows without the need to have Visual Studio installed:

  1. Download and extract the JetBrains redistributable of MSBuild
  2. Download and install Microsoft .NET Framework Developer Pack 4.5.1 or later
  3. Configure Rider to use a custom MSBuild executable
  4. For any other application types, check the list of prerequisites for using Rider under Windows without Visual Studio

Download Rider now and give it a try with our redistributable of MSBuild. We’d love to hear your feedback!

Update June 15, 2018: Updated binaries to include fix for “The “GetReferenceNearestTargetFrameworkTask” task was not found.” when building app project with reference to library project if .NET Core cross-platform development workload not installed.

Comments below can no longer be edited.

35 Responses to Introducing the JetBrains redistributable of MSBuild

  1. Avatar

    Denis Marinov says:

    April 13, 2018

    Doesn’t the Dotnet SDK come with a MSBuild ( already?

    • Avatar

      Maarten Balliauw says:

      April 13, 2018

      This is not enough for the full .NET Framework.

      • Avatar

        Denis Marinov says:

        April 13, 2018

        Okay, understandable. I’ll give it a try. Btw, will the “JetBrains redistributable of MSBuild” be included as part of the upcoming release, or do we need to install it manually by every update?

        • Avatar

          Maarten Balliauw says:

          April 14, 2018

          We are planning to update this MSBuild frequently and having a link to it right from within Rider.

  2. Avatar

    Vadym K says:

    April 16, 2018

    Would be great to download MSBuild as we download drivers in datagrip – without leaving IDE.

  3. Avatar

    Christian Schuster says:

    April 16, 2018

    Maybe I’m mistaken but wouldn’t the “Community” edition of the MSBuild tools suffice (I assume that counts as a validly licensed VS)?

    • Avatar

      Maarten Balliauw says:

      April 16, 2018

      Which link are they on?

      • Avatar

        Christian Schuster says:

        April 16, 2018

        Afaik it’s not a separate download. But I would assume that since you can install & run the BuildTools while only having a VS Community “license” that should take care of the licensing problem, right?

    • Avatar

      Oleksii Vynnychenko says:

      April 17, 2018

      VS Community Edition is only for personal (non-commercial) use, OSS, small teams or education.
      For day job at not super-small company you can’t use VS Community Edition.

  4. Avatar

    Yahor says:

    April 16, 2018

    Can’t it be on the Nuget? So, will make it easier to upgrade?

  5. Avatar

    Adnan says:

    April 17, 2018

    Can I build Setup project files .vdproj files? Because that is one of the main disaveteges from MSBuild.

    And what about missing NuGet packages? Are they automaticily downloaded?

    • Avatar

      Maarten Balliauw says:

      April 18, 2018

      Packages will be downloaded. For setup projects, you will need the targets for that on your machine as well.

      • Avatar

        Nate Guerin says:

        April 22, 2018

        This is of interest to me as well. I’d love to be able to build setup projects using your version of MSBuild without installing VS.

        When you say that the targets for setup projects need to be on your machine, what do you mean exactly? Would it be possible to point us towards some documentation that might help us set this up?

        • Avatar

          Maarten Balliauw says:

          April 23, 2018

          MSBuild uses targets files (usually containing build tasks) to be able to build certain application types. For web apps, these targets are available with a bit of searching.

          For several other project types (e.g. Azure Cloud Services), the targets usually ship with the SDK provided by Microsoft.

          And lately, may targets are appearing on, and can be included in your project file instead of having to rely on the targets being installed on your machine. Some examples can be seen searching NuGet for “targets” or “msbuild”.

  6. Avatar

    Georg says:

    August 6, 2018

    Thanks for providing the JetBrains redistributable of MSBuild! I tried switching to this version. Now the projects fail to load with the following error message: “5:40 PM Project ‘DbContextScope’ load failed: The SDK ‘Microsoft.NET.Sdk’ specified could not be found. C:\code\Backend\DbContextScope\DbContextScope.csproj at (0:0)”

    Content of “DbContextScope.csproj”


    It works perfectly fine when switching back to the MSBuild provided by the Microsoft Build Tools 2017. Any ideas?

    • Avatar

      Georg says:

      August 6, 2018

      Dear JetBrains moderators:
      Unfortunately my previous comment is incomplete as the comment box removed the xml content of my example file. I uploaded it as a gist:

      It would be great if you could insert this link instead of the string “net462”. Thank you!

      • Avatar

        Maarten Balliauw says:

        August 6, 2018

        Our MSBuild will only work for regular .NET projects (not .NET Core/new project format right now)

  7. Avatar

    Sandor Drieënhuizen says:

    August 16, 2018

    Too bad this leaves me stuck at C# 7.2 for now…

  8. Avatar

    Rhiannon Tully-Barr says:

    October 30, 2018

    I’m having a minor issue using this MSBuild version: It’s not automatically detected by NuGet (despite being on my Path, and NuGet’s auto-detection claiming to use the version from the path by default). It’s finding the version included with the .NET developer pack instead.

    Any workarounds, or plans to include an installer in future so that NuGet is able to detect MSBuild?

  9. Avatar

    Jose Alvarez says:

    January 3, 2019

    I´m having some problems trying to build my solution with multiple projects inside with this Redistributable MSBuild, but not with Visual Studio one.

    error CS0246: The type or namespace name ‘LiveJob’ could not be found (are you missing a using directive or
    an assembly reference?)


    • Avatar

      Maarten Balliauw says:

      January 3, 2019

      If that project (or another) happens to reference the web targets, compilation will fail for that project/those projects.

  10. Avatar

    Janatbek says:

    February 25, 2019

    what about mono executable?
    how and where I can find it?

  11. Avatar

    Rhiannon says:

    May 1, 2019


    Does this redistributable contain the 32-bit version of MSBuild only?
    I’m trying to build a project with it and am running into an error:

    error MSB4216: Could not run the “GenerateResource” task because MSBuild could not create or connect to a task host with runtime “CLR4” and architecture “x64”. Please ensure that
    (1) the requested runtime and/or architecture are available on the machine, and
    (2) that the required executable “C:\SDK\MSBuild\15.0\Bin\amd64\MSBuild.exe” exists and can be run.

    There is no Bin\amd64 folder in the redistributable, so I’m wondering if I need to point to the 64-bit MSBuild located elsewhere or if it is truly missing.

  12. Avatar

    Evity says:

    October 16, 2019

    Had a problem compiling solution which reads error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

  13. Avatar

    Martin Winter says:

    January 15, 2020

    Doesn’t Rider 2019.3 include version 16.0 of MSBuild? Please update the post accordingly if this is correct.

    • Avatar

      Andrew Barlow says:

      April 17, 2020

      I second this. Especially as it looks like 2020.1 also includes 16.0 of MSBuild.

      Nothing worse than stale documentation.

Discover more