Muonroi.Diagnostics.Generator 2.0.2

dotnet add package Muonroi.Diagnostics.Generator --version 2.0.2
                    
NuGet\Install-Package Muonroi.Diagnostics.Generator -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Muonroi.Diagnostics.Generator" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Muonroi.Diagnostics.Generator" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Muonroi.Diagnostics.Generator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Muonroi.Diagnostics.Generator --version 2.0.2
                    
#r "nuget: Muonroi.Diagnostics.Generator, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Muonroi.Diagnostics.Generator@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Muonroi.Diagnostics.Generator&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Muonroi.Diagnostics.Generator&version=2.0.2
                    
Install as a Cake Tool

Muonroi.Diagnostics.Generator

NuGet

Roslyn source generator for automatic trace instrumentation.

Overview

Contains TraceableGenerator and TraceableSyntaxRewriter to automatically emit diagnostic tracing code for methods marked for instrumentation during compilation.

Features

  • Source Generation: TraceableGenerator automatically instruments marked classes.
  • Syntax Rewriting: Uses TraceableSyntaxRewriter to weave MTraceSessionScope calls without boilerplate.

Installation

dotnet add package Muonroi.Diagnostics.Generator

Quick Start

// Just add the package. The source generator automatically instruments
// classes decorated with appropriate tracing attributes.

[Traceable]
public class WorkerClass
{
    public void Process() { } // MTraceSessionScope injected at compile time
}

Ecosystem Combinations

Muonroi.Diagnostics.Generator + Muonroi.Diagnostics

The generator emits code that relies on MTraceSession from the Muonroi.Diagnostics package, removing the need to write boilerplate trace scopes.

Samples

Find complete running examples in the ../../samples/ directory.

License

This project is licensed under the terms of the applicable Muonroi license.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 84 8/26/2026
2.0.1 88 8/26/2026
2.0.0 177 8/14/2026