![]() |
VOOZH | about |
dotnet add package Basic.CompilerLog.Util --version 0.9.41
NuGet\Install-Package Basic.CompilerLog.Util -Version 0.9.41
<PackageReference Include="Basic.CompilerLog.Util" Version="0.9.41" />
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.41" />Directory.Packages.props
<PackageReference Include="Basic.CompilerLog.Util" />Project file
paket add Basic.CompilerLog.Util --version 0.9.41
#r "nuget: Basic.CompilerLog.Util, 0.9.41"
#:package Basic.CompilerLog.Util@0.9.41
#addin nuget:?package=Basic.CompilerLog.Util&version=0.9.41Install as a Cake Addin
#tool nuget:?package=Basic.CompilerLog.Util&version=0.9.41Install as a Cake Tool
This is the repository for creating and consuming compiler log files. These are files created from a MSBuild binary log that contain information necessary to recreate all of the Compilation instances from that build.
The compiler log files are self contained. They must be created on the same machine where the binary log was created but after creation they can be freely copied between machines. That enables a number of scenarios:
This global tool can be installed via
dotnet tool install --global complog
From there the following commands are available:
create: create a complog file from an existing binary logreplay: replay the builds from the complogexport: export complete compilations to diskref: export references for a compilation to diskrsp: generate rsp files for compilation eventsprint: print the summary of a complog on the command lineA compiler log will include potentially sensitive artifacts
A compiler log file contains all of the information necessary to recreate a Compilation. That includes all source, resources, references, strong name keys, etc .... That will be visible to anyone you provide a compiler log to.
A compiler log will include artifacts like source code, references, etc ...
There are a number of ways to create a compiler log. The first step is to install the complog global tool as that will be used to create the compiler log.
> dotnet tool install -g complog
The easiest is to create it off of a binary log file from a previous build.
> msbuild -bl MySolution.sln
> complog create msbuild.binlog
By default this will include every project in the binary log. If there are a lot of projects this can produce a large compiler log. You can use the -p option to limit the compiler log to a specific set of projects.
> complog create msbuild.binlog -p MyProject.csproj
For solutions or projects that can be built with dotnet build a compiler log can be created by just running create against the solution or project file directly.
> complog create MyProject.csproj
When trying to get a compiler log from a build that occurs in a GitHub action you can use the complog-action action to simplify creating and uploading the compiler log.
- name: Build .NET app
run: dotnet build -bl
- name: Create and upload the compiler log
uses: jaredpar/basic-compilerlog-action@v1
with:
binlog: msbuild.binlog
To re-run all of the compilations in a compiler log use the replay command
> complog replay build.complog
Microsoft.VisualStudio.IntegrationTest.IntegrationService.csproj (net472) ...Success
Roslyn.Test.Performance.Utilities.csproj (net472) ...Success
Microsoft.CodeAnalysis.XunitHook.csproj (net472) ...Success
Passing the -export argument will cause all failed compilations to be exported to the local disk for easy analysis.
To debug a compilation in Visual Studio first export it to disk:
> complog export build.complog
That will write out all the artifacts necessary to run a command line build to disk. Use the --project option to limit the output to specific projects. For each project it will generate a build.rsp command that uses the exported arguments. It will also generate several build*.cmd files. Those will execute dotnet exec csc.dll @build.rsp on the build for every SDK installed on the machine.
The next step is to setup csc / vbc to use the build.rsp file for debugging. Open the debug settings for csc / vbc and set them to have the argument @build.rsp and make the working directory the location of that file.
Then launch csc / vbc and it will debug that project.
The samples below for creating Roslyn objects work for both compiler and binary logs. For a binary log though it must be done on the same machine where the build occurred.
Log files can be used to recreate a Compilation instance. This is done by calling the Compilation.Create method and passing in the path to the compiler log file.
using var reader = CompilerCallReaderUtil.Create(logFilePath);
foreach (var compilationData in reader.ReadAllCompilationData())
{
var compilation = compilationData.GetCompilationAfterGenerators();
// ...
}
The SolutionReader type can be used to create a SolutionInfo instance from the log file:
var reader = SolutionReader.Create(logFilePath);
var workspace = new AdhocWorkspace();
var solution = workspace.AddSolution(reader.ReadSolutionInfo());
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 is compatible. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 2 NuGet packages that depend on Basic.CompilerLog.Util:
| Package | Downloads |
|---|---|
|
TwoHash.Core
Core library for TwoHash — compiler-driven type information for C# documentation |
|
|
GloSharp.Core
Core library for GloSharp — compiler-driven type information for C# documentation |
Showing the top 4 popular GitHub repositories that depend on Basic.CompilerLog.Util:
| Repository | Stars |
|---|---|
|
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
|
|
|
dotnet/sdk
Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
|
|
|
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
|
|
|
X-Sharp/XSharpPublic
Public repository for the source code for the XSharp Compiler, Runtime, Project System and Tools.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.41 | 123 | 6/9/2026 |
| 0.9.40 | 99 | 6/8/2026 |
| 0.9.39 | 7,949 | 5/4/2026 |
| 0.9.38 | 142 | 4/27/2026 |
| 0.9.37 | 161 | 4/20/2026 |
| 0.9.36 | 168 | 4/14/2026 |
| 0.9.35 | 128 | 4/13/2026 |
| 0.9.34 | 451 | 3/19/2026 |
| 0.9.33 | 129 | 3/17/2026 |
| 0.9.32 | 263 | 2/22/2026 |
| 0.9.31 | 159 | 2/17/2026 |
| 0.9.30 | 132 | 2/17/2026 |
| 0.9.29 | 131 | 2/17/2026 |
| 0.9.28 | 132 | 2/17/2026 |
| 0.9.27 | 191 | 1/17/2026 |
| 0.9.26 | 171 | 1/5/2026 |
| 0.9.25 | 63,486 | 11/10/2025 |
| 0.9.24 | 282 | 11/3/2025 |
| 0.9.21 | 15,527 | 10/20/2025 |
| 0.9.20 | 270 | 10/14/2025 |