Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.

License

NotificationsYou must be signed in to change notification settings

KirillOsenkov/MSBuildStructuredLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values. It can greatly simplify build investigations and provides a portable log interchange format (*.binlog) and a rich interactive log viewer app.

Build statusNuGet packageChocolatey

Homepage:https://msbuildlog.com

View binlogs in the Browser:https://live.msbuildlog.com

Important: the NuGet package is now being published tohttps://nuget.org/packages/MSBuild.StructuredLogger (old location:https://nuget.org/packages/Microsoft.Build.Logging.StructuredLogger). Please update to use the new Package Id.

Thanks toSignPath.io for providing a free code signing service and to theSignPath Foundation for a free code signing certificate to sign the installer.

Install:

Install fromhttps://msbuildlog.com.

The app updates automatically viaSquirrel (after launch it checks for updates in background), next launch starts the newly downloaded latest version.

Screenshot1

Installing the Avalonia version on Mac:

Download the latest release forarm64 orx64.

Alternatively, you can install from Homebrew:

brew install structuredlogviewer

Building & Running the Avalonia version on Mac:

git clone https://github.com/KirillOsenkov/MSBuildStructuredLogcd MSBuildStructuredLog./run.sh

Alternatively, a longer version:

  1. dotnet build MSBuildStructuredLog.Avalonia.sln
  2. dotnet publish MSBuildStructuredLog.Avalonia.sln --self-contained -o <some_dir> (I used $HOME/tools/artifacts/StructuredLogViewer.Avalonia)
  3. make a script$HOME/bin/structured-log-viewer (or whatever's on your PATH):
#! /bin/shexec dotnet ${HOME}/tools/artifacts/StructuredLogViewer.Avalonia/publish/StructuredLogViewer.Avalonia.dll "$@"

Requirements:

Windows:

  • .NET Framework 4.7.2
  • MSBuild 16.0
  • Visual Studio 2019

Mac:

  • .NET 8 SDK

Usage:

Starting with MSBuild 15.3 you can pass the new/bl switch tomsbuild.exe to record a binary build log tomsbuild.binlog, in the same folder as the project/solution being built:

Screenshot

or you can build the solution or open an existing log file through the viewer app:

Screenshot2

Alternatively (useful for older versions of MSBuild) you can attach the logger to any MSBuild-based build using the logger library:StructuredLogger.dll. It is available in a NuGet package:https://www.nuget.org/packages/MSBuild.StructuredLogger

msbuild solution.sln /t:Rebuild /v:diag /noconlog /logger:BinaryLogger,%localappdata%\MSBuildStructuredLogViewer\app-2.1.596\StructuredLogger.dll;1.binlog

To use a portable version of the logger (e.g. with thedotnet msbuild command) you need a .NET Standard version ofStructuredLogger.dll, not the .NET Framework (Desktop) version.

Download this NuGet package:https://www.nuget.org/packages/MSBuild.StructuredLogger/2.1.545and inside it there's thelib\netstandard2.0\StructuredLogger.dll. Try passing that todotnet build like this:

dotnet msbuild Some.sln /v:diag /nologo /logger:BinaryLogger,"packages\MSBuild.StructuredLogger.2.1.545\lib\netstandard2.0\StructuredLogger.dll";"C:\Users\SomeUser\Desktop\binarylog.binlog"

Read more about the log formats here:https://github.com/KirillOsenkov/MSBuildStructuredLog/wiki/Log-Format

Features:

  • Preprocess project files (with all imports inlined), right-click on a project -> Preprocess
  • If a log has embedded files, you can view the list of files, full-text search in all files, and use the Space key (or double-click) on most nodes to view the source code.
  • Displaysdouble-writes (when files from different sources are written to the same destination during a build, thus causing non-determinism)
  • Displays target dependencies for each target
  • Narrow down the search results using the under() or project() clauses to only display results under a certain parent or project.
  • Each node in the tree has a context menu. Ctrl+C to copy an item and the entire subtree to Clipboard as text.
  • Delete to hide nodes from the tree (to get uninteresting stuff out of the way).
  • Open and save log files (option to save log files to .xml)
  • Logs can include the source code project files and all imported files used during the build.

Investigating problems with MSBuildStructuredLog

Open an issue if you're running into something weird and I can take a look into it. If MSBuildStructuredLog crashes during the build, it will attempt to write the exception call stack to:

%localappdata%\Microsoft\MSBuildStructuredLog\LoggerExceptions.txt

MSBuild Resources

About

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors79

Languages


[8]ページ先頭

©2009-2025 Movatter.jp