MSBuild: the XML build engine that Visual Studio leans on
The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
At a glance
- What is it?
- MSBuild is the Microsoft Build Engine, the build platform for .NET and Visual Studio: XML project files describe the build, msbuild.exe runs it with or without Visual Studio, and the whole engine is developed in the open under MIT. Releases arrive monthly, with v18.10.1 on 2026-09-08.
- Who is it for?
- Use MSBuild if you build .NET software, which you almost certainly do, since it is the engine under Visual Studio and the msbuild.exe that CI agents invoke. Reach for Cake or Nuke when you want build automation written in C#, remembering that they orchestrate MSBuild rather than replace it.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 4 days ago.
- What is it written in?
- Mainly C#, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A project file format that doubles as the build language
The Microsoft Build Engine provides an XML schema for a project file that controls how the build platform processes and builds software, and that sentence carries the whole design: the project file is not a configuration read by a smarter program, it is the build, expressed as targets, tasks, properties and items that the engine evaluates. Visual Studio uses MSBuild, but the dependency runs one way, and MSBuild can run without Visual Studio: invoking msbuild.exe on a project or solution file orchestrates and builds products in environments where Visual Studio is not installed, which is why every CI agent in the .NET world eventually runs it. The surrounding ecosystem of C# build automation, Cake and Nuke among them, orchestrates builds but drives MSBuild underneath rather than replacing it. The engine itself is C#, MIT licensed, and developed on GitHub with public CI, which was not the case for most of its life and remains the interesting fact about this repository.
Building the builder: seven steps with Visual Studio 2026
Compiling MSBuild from source is a documented, step-counted procedure. Install Visual Studio 2026 with the components listed in the repository's .vsconfig, which means the .NET desktop development workload. Install .NET Framework 3.5, because a full MSBuild build includes outputs that require it. Ensure long path support is enabled at the Windows level. Then, from a Developer Command Prompt for VS 2026:
git clone https://github.com/dotnet/msbuild.\build.cmdThe build script also restores the packages needed to open the projects in Visual Studio, and the solution files are MSBuild.slnx or the filtered MSBuild.Dev.slnf. The freshly built engine lands at artifacts\bin\bootstrap\net472\MSBuild\Current\Bin\MSBuild.exe, with the README's candid caveat that it may not work for all scenarios, C++ builds named explicitly. Because the bootstrap location is a plain directory rather than an installation, pointing that MSBuild.exe at a real project is the natural next check, and the .vsconfig file doubles as the authoritative list of what a complete development environment needs.
.NET Framework 3.5, long paths, and a net472 bootstrap
The requirements list for building a 2026-era toolchain component reads like an archaeology exercise, and each item is load-bearing. .NET Framework 3.5 exists in the build because full MSBuild builds include outputs that still require it. Long path support must be enabled at the Windows registry level, the classic MAX_PATH ceiling that deep repository trees hit. The bootstrap output targets net472, the .NET Framework 4.7.2 flavor, meaning the Windows build of the engine still compiles down to the classic framework even as everything around it moves to modern .NET. On the Unix side, MSBuild runs on systems supporting .NET Core, with setup instructions in a wiki document, Building Testing and Debugging on .Net Core MSBuild, rather than in the README itself. None of this is accidental; it is the compatibility surface of a build engine that must build software from eras it has outlived.
Five components, from the exe to your own tasks
The component map in the README describes an engine designed to be embedded, not just executed. MSBuild.exe is the entry point, the Microsoft.Build.CommandLine assembly. The Microsoft.Build namespaces provide programmatic access to and control of the engine, so another application can host builds in process. Microsoft.Build.Framework defines how tasks and loggers interact with the engine, the contract layer. Microsoft.Build.Tasks contains the implementation of all tasks shipping with MSBuild, and Microsoft.Build.Utilities provides helper classes for writing your own loggers and tasks. The practical consequence is that MSBuild is a library with a command-line front end: a custom tool can evaluate a project, hook the logging stream and run targets without ever shelling out, which is exactly how IDE integrations are built on top of it. For task and logger authors, the pieces that matter are Framework and Utilities, the contract and helper layers, while the task implementations in Tasks serve as readable reference for how the shipped ones are written.
slnx, slnf and Directory.Packages.props: it eats its own cooking
The repository's own layout demonstrates the engine's advanced features, a useful reference since the same files work in any project. The solutions are MSBuild.slnx and MSBuild.VSTest.slnx, the newer XML solution format, alongside MSBuild.Dev.slnf and MSBuild.SourceBuild.slnf, solution filters that subset a large solution for focused development and source-build scenarios. Directory.Build.props, Directory.Build.targets and a Directory.Build.rsp apply repository-wide settings, imported automatically by every project under the tree, and Directory.Packages.props implements central package management, keeping dependency versions in one file. A NuGet.config pins the package sources, global.json pins the SDK, and eng/ plus scripts/ carry the engineering automation. For anyone learning what these files do, the MSBuild repository is a worked example maintained by the people who implement the features.
Monthly releases and a changelog with real detail
Release cadence is dependable: v18.8.2 arrived 2026-07-15, v18.9.6 on 2026-08-11 and v18.10.1 on 2026-09-08, with the last repository push on 2026-09-25. The changelog at documentation/Changelog.md carries detailed information about changes per release, and it is the document to read before upgrading an SDK or a CI image, since engine behavior changes surface there first; for a team pinning toolchain versions, the three most recent entries are the cheapest upgrade risk assessment available. Localization is a first-class concern: passing /p:LocalizedBuild=true on the command line turns on localized builds, and a dedicated localization guide explains how to contribute translations for the engine's messages. Security has its own policy in SECURITY.md, third-party notices are recorded in THIRDPARTYNOTICES.txt, and an AGENTS.md in the root continues the now-familiar pattern of repositories that explicitly onboard AI coding assistants.
Open CI, help wanted issues and an assign-first etiquette
Contribution infrastructure reflects the project's corporate-open-source hybrid reality. Continuous integration runs on Azure DevOps, visible through the dnceng public pipeline badges, with .vsts-dotnet-ci.yml and .vsts-dotnet.yml plus an azure-pipelines directory and an .azuredevops folder carrying the definitions. New contributors are pointed at help wanted issues with a specific etiquette: leave a comment asking to be assigned before starting work, which prevents duplicated effort across a large and distributed team. A label documentation page decodes the repository's taxonomy, discussions host longer conversations, and the contributing guide spells out what kinds of pull requests are accepted. Instrumentation gets its own configuration, with Coverage.config and CoverageWindowsFull.config for coverage runs and an .opt-prof.yml feeding optimization profiling, the kind of measurement scaffolding a component under this much production load accumulates. For an outsider, the on-ramp is unusually well marked, and for an insider the lesson is how much of running a twenty-year-old build engine is process rather than code.
Editorial conclusion
Use MSBuild if you build .NET software, which you almost certainly do, since it is the engine under Visual Studio and the msbuild.exe that CI agents invoke. Reach for Cake or Nuke when you want build automation written in C#, remembering that they orchestrate MSBuild rather than replace it. Verify first which toolchain builds your scenario, note the README's own caveat that a freshly built bootstrap MSBuild may not handle C++ builds, and check documentation/Changelog.md when moving between the monthly releases.
Frequently asked questions
What is MSBuild used for?
MSBuild is the build platform for .NET and Visual Studio: an XML project file schema controls how software is processed and built. Invoking msbuild.exe on a project or solution orchestrates the build, including in environments where Visual Studio is not installed.
Is MSBuild part of Visual Studio?
Visual Studio uses MSBuild, so it is included there, but MSBuild can also run without Visual Studio. By invoking msbuild.exe on your project or solution file you can build in environments where Visual Studio is not installed.
How do you use MSBuild without Visual Studio?
Run msbuild.exe against your project or solution file; no Visual Studio installation is required. MSBuild itself can also be built from source by cloning the repository and running .\build.cmd, with the output under artifacts\bin\bootstrap.
How do you run MSBuild from the command line?
Invoke msbuild.exe on your project or solution file from a command prompt. Visual Studio's Developer Command Prompt sets up the necessary path, and the full documentation lives on learn.microsoft.com under visualstudio/msbuild.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/dotnet-msbuild)