{"id":13457969,"url":"https://github.com/KirillOsenkov/MSBuildStructuredLog","last_synced_at":"2025-03-24T14:32:58.893Z","repository":{"id":38145854,"uuid":"58072705","full_name":"KirillOsenkov/MSBuildStructuredLog","owner":"KirillOsenkov","description":"A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.","archived":false,"fork":false,"pushed_at":"2025-03-17T18:13:41.000Z","size":7346,"stargazers_count":1510,"open_issues_count":122,"forks_count":207,"subscribers_count":39,"default_branch":"main","last_synced_at":"2025-03-17T18:15:35.634Z","etag":null,"topics":["avalonia","csharp","dotnet","msbuild","nuget","viewer","wpf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KirillOsenkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["KirillOsenkov"]}},"created_at":"2016-05-04T17:58:58.000Z","updated_at":"2025-03-17T18:13:45.000Z","dependencies_parsed_at":"2022-07-12T17:12:15.810Z","dependency_job_id":"c7fda2ce-78bf-4c3a-9c0a-1400e74a9b5b","html_url":"https://github.com/KirillOsenkov/MSBuildStructuredLog","commit_stats":{"total_commits":2078,"total_committers":84,"mean_commits":"24.738095238095237","dds":"0.24975938402309916","last_synced_commit":"2fde2f1c4e146604656ab6dffd13dd6613dfc4fa"},"previous_names":[],"tags_count":194,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KirillOsenkov%2FMSBuildStructuredLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KirillOsenkov%2FMSBuildStructuredLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KirillOsenkov%2FMSBuildStructuredLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KirillOsenkov%2FMSBuildStructuredLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KirillOsenkov","download_url":"https://codeload.github.com/KirillOsenkov/MSBuildStructuredLog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244085031,"owners_count":20395523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalonia","csharp","dotnet","msbuild","nuget","viewer","wpf"],"created_at":"2024-07-31T09:00:40.963Z","updated_at":"2025-03-24T14:32:58.885Z","avatar_url":"https://github.com/KirillOsenkov.png","language":"C#","funding_links":["https://github.com/sponsors/KirillOsenkov"],"categories":["C\\#","C#"],"sub_categories":[],"readme":"# MSBuildStructuredLog\nA 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.\n\n[![Build status](https://ci.appveyor.com/api/projects/status/v7vwgphs239i14ya?svg=true)](https://ci.appveyor.com/project/KirillOsenkov/msbuildstructuredlog)\n[![NuGet package](https://img.shields.io/nuget/v/MSBuild.StructuredLogger.svg)](https://nuget.org/packages/MSBuild.StructuredLogger)\n[![Chocolatey](https://img.shields.io/chocolatey/v/msbuild-structured-log-viewer.svg)](https://chocolatey.org/packages/msbuild-structured-log-viewer)\n\nHomepage: https://msbuildlog.com\n\nView binlogs in the Browser: https://live.msbuildlog.com\n\nImportant: the NuGet package is now being published to https://nuget.org/packages/MSBuild.StructuredLogger (old location: https://nuget.org/packages/Microsoft.Build.Logging.StructuredLogger). Please update to use the new Package Id.\n\nThanks to [SignPath.io](https://signpath.io?utm_source=foundation\u0026utm_medium=github\u0026utm_campaign=MSBuildStructuredLog) for providing a free code signing service and to the [SignPath Foundation](https://signpath.org?utm_source=foundation\u0026utm_medium=github\u0026utm_campaign=MSBuildStructuredLog) for a free code signing certificate to sign the installer.\n\n## Install:\nInstall from https://msbuildlog.com.\n\nThe app updates automatically via [Squirrel](https://github.com/Squirrel/Squirrel.Windows) (after launch it checks for updates in background), next launch starts the newly downloaded latest version.\n\n![Screenshot1](https://msbuildlog.com/Screenshot1.png)\n\n## Installing the Avalonia version on Mac:\n\nDownload the latest release for [arm64](https://github.com/KirillOsenkov/MSBuildStructuredLog/releases/latest/download/StructuredLogViewer-arm64.dmg) or [x64](https://github.com/KirillOsenkov/MSBuildStructuredLog/releases/latest/download/StructuredLogViewer-x64.dmg).\n\nAlternatively, you can install from Homebrew:\n\n```\nbrew install structuredlogviewer\n```\n\n## Building \u0026 Running the Avalonia version on Mac:\n\n```\ngit clone https://github.com/KirillOsenkov/MSBuildStructuredLog\ncd MSBuildStructuredLog\n./run.sh\n```\n\nAlternatively, a longer version:\n\n1. `dotnet build MSBuildStructuredLog.Avalonia.sln`\n2. `dotnet publish MSBuildStructuredLog.Avalonia.sln --self-contained -o \u003csome_dir\u003e` (I used $HOME/tools/artifacts/StructuredLogViewer.Avalonia)\n3. make a script `$HOME/bin/structured-log-viewer` (or whatever's on your PATH):\n\n```\n#! /bin/sh\nexec dotnet ${HOME}/tools/artifacts/StructuredLogViewer.Avalonia/publish/StructuredLogViewer.Avalonia.dll \"$@\"\n```\n\n## Requirements:\n\nWindows:\n * .NET Framework 4.7.2\n * MSBuild 16.0\n * Visual Studio 2019\n\nMac:\n * .NET 8 SDK\n\n## Usage:\n\nStarting with MSBuild 15.3 you can pass the new `/bl` switch to `msbuild.exe` to record a binary build log to `msbuild.binlog`, in the same folder as the project/solution being built:\n\n![Screenshot](https://msbuildlog.com/BinLogFromCommandLine.png)\n\nor you can build the solution or open an existing log file through the viewer app:\n\n![Screenshot2](/docs/Screenshot2.png)\n\nAlternatively (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:\nhttps://www.nuget.org/packages/MSBuild.StructuredLogger\n\n```\nmsbuild solution.sln /t:Rebuild /v:diag /noconlog /logger:BinaryLogger,%localappdata%\\MSBuildStructuredLogViewer\\app-2.1.596\\StructuredLogger.dll;1.binlog\n```\n\nTo use a portable version of the logger (e.g. with the `dotnet msbuild` command) you need a .NET Standard version of `StructuredLogger.dll`, not the .NET Framework (Desktop) version.\n\nDownload this NuGet package: https://www.nuget.org/packages/MSBuild.StructuredLogger/2.1.545\nand inside it there's the `lib\\netstandard2.0\\StructuredLogger.dll`. Try passing that to `dotnet build` like this:\n```\ndotnet 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\"\n```\n\nRead more about the log formats here:\nhttps://github.com/KirillOsenkov/MSBuildStructuredLog/wiki/Log-Format\n\n## Features:\n\n * Preprocess project files (with all imports inlined), right-click on a project -\u003e Preprocess\n * 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.\n * Displays [double-writes](https://github.com/KirillOsenkov/MSBuildStructuredLog/wiki/Double%20write%20detection) (when files from different sources are written to the same destination during a build, thus causing non-determinism)\n * Displays target dependencies for each target\n * Narrow down the search results using the under() or project() clauses to only display results under a certain parent or project.\n * Each node in the tree has a context menu. Ctrl+C to copy an item and the entire subtree to Clipboard as text.\n * Delete to hide nodes from the tree (to get uninteresting stuff out of the way).\n * Open and save log files (option to save log files to .xml)\n * Logs can include the source code project files and all imported files used during the build.\n\n## Investigating problems with MSBuildStructuredLog\n\nOpen 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:\n\n```\n%localappdata%\\Microsoft\\MSBuildStructuredLog\\LoggerExceptions.txt\n```\n\n## MSBuild Resources\n * [https://msbuildlog.com](https://msbuildlog.com)\n * [https://github.com/dotnet/msbuild/blob/main/documentation/wiki/MSBuild-Resources.md](https://github.com/dotnet/msbuild/blob/main/documentation/wiki/MSBuild-Resources.md)\n * [https://github.com/dotnet/msbuild/blob/main/documentation/wiki/MSBuild-Tips-\u0026-Tricks.md](https://github.com/dotnet/msbuild/blob/main/documentation/wiki/MSBuild-Tips-\u0026-Tricks.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKirillOsenkov%2FMSBuildStructuredLog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKirillOsenkov%2FMSBuildStructuredLog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKirillOsenkov%2FMSBuildStructuredLog/lists"}