Project System Tools
Project System Tools is a diagnostic extension for the C#, Visual Basic, and F# Project Systems in Visual Studio.
It can be downloaded from the Visual Studio Extension Marketplace:
Features
Once installed, some new items appear in the View > Other Windows
menu:
Selecting Build Logging
will show a new pane in Visual Studio:
Click the first toolbar icon to start recording both regular and design-time builds in the project system.
Once a build is recorded, it will appear as shown. Right-clicking the build item produces a context menu:
From here you may:
- Save Logs which prompts for a folder to save the
.binlog
file into - Open Logs which opens the log file inside Visual Studio
- Open Logs External which opens the
.binlog
file outside of Visual Studio (we recommend https://msbuildlog.com)
The Open Logs
option displays build results in a tree view:
By opening the Build Message List
pane (via the View > Other Windows
menu, as above) you can see data about the selected tree node.
Getting higher-fidelity logs from VS (VS2022 onwards)
The build events this extension subscribes contain the most useful information for diagnosing problems, but do omit some data for performance reasons.
In cases where more information is needed in binlogs, you can configure MSBuild to automatically write diagnostic data to disk. To do this for all builds within Visual Studio:
- Open a Developer Command Prompt for the version of Visual Studio you want to use
- Set two environment variables:
- Command
set MSBuildDebugEngine=1 set MSBUILDDEBUGPATH=c:\some\path
- PowerShell
$env:MSBuildDebugEngine = "1" $env:MSBUILDDEBUGPATH = "c:\some\path"
MSBUILDDEBUGPATH
, but it must be writeable by the current user. - Command
- Type
devenv
to start Visual Studio with this configuration - Open the
MSBUILDDEBUGPATH
path in Windows Explorer to see the captured binlog and other diagnostic files
For more information, see this documentation section.
If you see:
error : The type initializer for ‘Microsoft.Build.Shared.Debugging.DebugUtils’ threw an exception.
This indicates that the path set in MSBUILDDEBUGPATH
is not writeable by Visual Studio. Close VS, set a new path and try again.
Contributing
We welcome contributions and suggestions!
This project has adopted a code of conduct adapted from the Contributor Covenant to clarify expected behavior in our community. This code of conduct has been adopted by many other projects. For more information see Contributors Code of conduct.