Search code examples
visual-studiomsbuild

What are the existing build targets for MSBuild?


MSBuild allows you to specify build-targets such as Build or Clean with -target:<build-target> (Example: MSBuild.exe -target:Clean).

Of course, a developer can define their own target using a .targets xml file.

However, some targets, such as Build or Clean, are pre-defined by Microsoft.

What is the list of all default pre-defined build-targets that are common for all .NET languages?


Solution

  • You can use the command msbuild -targets to generate a list of current targets.

    With dotnet it's dotnet build -targets.