Skip to content

dotnet/project-system-tools

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
eng
 
 
img
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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:

  1. Open a Developer Command Prompt for the version of Visual Studio you want to use
  2. Set two environment variables as follows:
    set MSBuildDebugEngine=1
    set MSBUILDDEBUGPATH=c:\some\path
    
    You can use whatever path you like for MSBUILDDEBUGPATH, but it must be writeable by the current user.
  3. Type devenv to start Visual Studio with this configuration
  4. 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.