Skip to content

Instantly share code, notes, and snippets.

@jonathanpeppers
Last active October 20, 2022 15:36
Show Gist options
  • Save jonathanpeppers/6d37dd71fb93967b8787150787100804 to your computer and use it in GitHub Desktop.
Save jonathanpeppers/6d37dd71fb93967b8787150787100804 to your computer and use it in GitHub Desktop.
Notes on collecting MSBuild logs (for performance, or other reasons)

VS Windows

Install Project System Tools for VS 2022.

Open View > Other Windows > Build Logging:

View, Other Windows, Build Logging

Hit the "play" button:

Play Button

Go about your business, until you hit a performance issue (or bug!) you are interested in.

Save the logs and share them!

Save Logs

Note that Android has logs for Build and Install, while Windows and other platforms may just have logs for Build.

VS Mac

Matt Ward has an addin for VS Mac here:

https://github.com/mrward/monodevelop-project-system-tools/releases

Download the latest release and go to the Extensions... dialog in VS Mac:

VS Mac Extensions Dialog

Choose Install from File:

VS Mac Install from File

Open a .sln and you should see View > Other Windows > Build Logging:

VS Mac Other Windows Build Logging

Hit the "play" button:

VS Mac Play button

VS Mac can open the .binlog files:

VS Mac Open binlog

From here you can save the file somewhere:

VS Mac Save binlog

Command-Line

Simply add -bl to every command you do, and if something goes wrong there will be a msbuild.binlog file in the current directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment