Skip to content

MSBuild Tips & Tricks

Kirill Osenkov edited this page May 17, 2016 · 21 revisions

#MSBuild.exe /pp MSBuild preprocessor. Pass /pp to the command line to create a single huge XML project file with all project imports inlined in the correct order. This is useful to investigate the ordering of evaluation and execution. Example:

msbuild MyProject.csproj /pp:inlined.proj

#MSBuild.exe /m Parallel build. Many people still don't know that they can significantly speed up their builds by passing /m to MSBuild.exe.

#EnvironmentVariables

  • MSBUILDTARGETOUTPUTLOGGING - set this to enable printing all target outputs to the log.
  • MSBUILDLOGTASKINPUTS - log task inputs.