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?
You can use the command msbuild -targets
to generate a list of current targets.
With dotnet
it's dotnet build -targets
.