Introducing the JetBrains redistributable of MSBuild

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.

This entry was posted in How-To's and tagged , , , . Bookmark the permalink.

16 Responses to Introducing the JetBrains redistributable of MSBuild

  1. Denis Marinov says:

    Doesn’t the Dotnet SDK come with a MSBuild (https://ibb.co/em0ygn) already?

  2. Vadym K says:

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

  3. Christian Schuster says:

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

  4. Yahor says:

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

  5. Adnan says:

    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?

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

      • Nate Guerin says:

        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?

        • 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 NuGet.org, 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”.

Leave a Reply

Your email address will not be published. Required fields are marked *