MSBuild is Microsoft’s build engine platform. It uses XML project files to orchestrate compilation and packaging, runs via MSBuild.exe or dotnet build, and works with or without Visual Studio.
Overview
MSBuild (the Microsoft Build Engine) is a platform for building applications from XML project and solution files. Visual Studio relies on it, but you can invoke MSBuild.exe or dotnet build on machines that never installed the IDE.
Project files describe items to build, properties, tasks, and targets. SDK-style projects reference frameworks like the .NET SDK, which import standard props and targets implicitly. You can extend or override build steps from Visual Studio or a text editor.
Command-line builds accept project files with options to set properties, run specific targets, and control parallelism. On Windows without Visual Studio, Build Tools for Visual Studio deliver MSBuild.exe; on macOS, Windows, or Linux the .NET SDK exposes dotnet build as a thin wrapper over the .NET Core MSBuild.
Namespaces in the product expose programmatic access to the engine, tasks, loggers, and shipped build tasks. Documentation covers walkthroughs, property and item syntax, localized builds, and integration with pipelines that compile code using MSBuild.
Key features
- XML-based project and target model
- Runs inside or outside Visual Studio
- MSBuild.exe and dotnet build entry points
- SDK-style imports for .NET projects
- Extensible tasks, loggers, and properties
- Command-line property and target control
- Programmatic Microsoft.Build APIs
- Localized build output option
Use cases
- CI builds without the Visual Studio IDE
- Custom preprocessing or post-build steps
- Orchestrating multi-project solutions from the shell
- Extending builds with custom MSBuild tasks