dotnet-msbuild(1)

πŸ“¦
version 11.0.0~rc3 Β· 5 versions
, in alpine 3.24, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… dotnet-msbuild(1) β€” the .NET Documentation girlies know

okay so bestie, welcome to the dotnet-msbuild(1) page from the .NET Documentation set. it's giving "MSBuild but make it dotnet", and honestly? iconic. ✨

πŸ“Œ this article applies to: βœ”οΈ .NET 6 SDK and later versions

🌸 NAME 🌸

dotnet-msbuild β€” builds a project and all of its dependencies.

πŸ’€ real talk though: a solution or project file may need to be specified if there are multiple. not me forgetting that and staring at my terminal like πŸ‘οΈπŸ‘„πŸ‘οΈ

✨ SYNOPSIS ✨

dotnet msbuild <MSBUILD_ARGUMENTS>

dotnet msbuild -h

πŸŽ€ DESCRIPTION πŸŽ€

so the dotnet msbuild command gives you access to a fully functional MSBuild. the whole thing. the full serve. no cap. πŸ”₯

it has the exact same capabilities as the existing MSBuild command-line client β€” but for SDK-style projects only. the options are all the same, fr fr. and if you wanna know about all the available options, go check the MSBuild command-line reference. iykyk πŸ“–βœ¨

and here's the tea πŸ“: the dotnet build command is equivalent to dotnet msbuild -restore.

πŸ’‘ that's literally the same thing, just with the restore already baked in. main character energy.

🌈 EXAMPLES 🌈

okay bestie, let's get into the good stuff πŸ‘‘

  1. Build a project and its dependencies:
dotnet msbuild
  1. Build a project and its dependencies using Release configuration:
dotnet msbuild -property:Configuration=Release
  1. Run the publish target and publish for the osx-x64 RID:
dotnet msbuild -target:Publish -property:RuntimeIdentifiers=osx-x64
  1. See the whole project with all targets included by the SDK:
dotnet msbuild -preprocess
dotnet msbuild -preprocess:<fileName>.xml

and that's the whole vibe check, bestie πŸ¦‹ this one's from the .NET Documentation source, dated 2025-10-30, and you already know the manual name β€” it's dotnet-msbuild(1) πŸ’– go build something cute, and remember: <MSBUILD_ARGUMENTS> are your besties. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from