2021 - Visual Studio Build Tools
The installer allows you to pick specific "workloads" to keep the footprint small.
msbuild MyProject.sln /p:Configuration=Release Clean a project: msbuild MyProject.sln /t:Clean Restore packages: nuget restore MyProject.sln Licensing Note visual studio build tools
Use the Developer Command Prompt or Developer PowerShell shortcuts created during installation. These automatically set the required environment variables (like PATH ) so you can run msbuild from any directory. Common MSBuild Commands The installer allows you to pick specific "workloads"
While the tools are free to download, their licensing typically follows the Visual Studio model. For enterprise organizations (more than 250 PCs or $1M USD in revenue), a paid Visual Studio license (Professional or Enterprise) is usually required for each user contributing to the projects being built, even if they only use the command-line tools. Always check the latest Microsoft EULA for your specific use case. Common MSBuild Commands While the tools are free