Introducing the JetBrains redistributable of MSBuild
TL;DR: (Update February 12, 2020)
- MSBuild from Microsoft Build Tools 2017 requires a valid license of Visual Studio.
- 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.
- 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:
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.
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:
- Download and extract the JetBrains redistributable of MSBuild
- Download and install Microsoft .NET Framework Developer Pack 4.5.1 or later
- Configure Rider to use a custom MSBuild executable
- For any other application types, check the list of prerequisites for using Rider under Windows without Visual Studio
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.