-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Capturing Binary Logs
It is often extremely helpful to attach "binary logs" to an issue which you have collected from your project. These binary logs (also known as a binlog
) contain useful build output information in a format which is much easier to analyze with a tool such as MSBuild Binary and Structure Log Viewer.
If you are asked to provide these types of logs, you should also consider if it's more appropriate to capture them from a command line build (which is preferred, if you are able to reproduce your issue that way), or from Visual Studio (if you're unable to produce the same issues from a command line build).
Here are the steps for either scenario:
Any dotnet build
command can have the -bl
flag appended to the command to capture the output to a .binlog
file which by default is called msbuild.binlog
and is created in your current working directory where you issued the build command from. More binary log into and command options can be found in the MSBuild Binary Log Docs.
eg: dotnet build MauiApp1.csproj -bl
-
Under Visual Studio's
Tools > Options
, in theProjects and Solutions > Build And Run
section, ensure that MSBuild project build log file verbosity is set toDiagnostic
-
In Visual Studio's
Extensions > Manage Extensions...
Browse for, and installProject System Tools 2022
You will need to close Visual Studio and finish installing the extension before using it
-
In Visual Studio's
View > Other Windows > Build Logging
, click the "Play" button to start recording build logs: -
Run the step(s) / build command(s) to reproduce your issue - you should see a number of entries start to appear in the Build Logging pane.
-
Select all of the entries, and right click and select
Save Logs...
which will prompt you to select a folder to save them to. -
Create a zip archive of the logs which were exported and attach those to your issue