Metalama.Extensions.HtmlWriter
2027.0.9-preview
Prefix Reserved
dotnet add package Metalama.Extensions.HtmlWriter --version 2027.0.9-preview
NuGet\Install-Package Metalama.Extensions.HtmlWriter -Version 2027.0.9-preview
<PackageReference Include="Metalama.Extensions.HtmlWriter" Version="2027.0.9-preview" />
<PackageVersion Include="Metalama.Extensions.HtmlWriter" Version="2027.0.9-preview" />
<PackageReference Include="Metalama.Extensions.HtmlWriter" />
paket add Metalama.Extensions.HtmlWriter --version 2027.0.9-preview
#r "nuget: Metalama.Extensions.HtmlWriter, 2027.0.9-preview"
#:package Metalama.Extensions.HtmlWriter@2027.0.9-preview
#addin nuget:?package=Metalama.Extensions.HtmlWriter&version=2027.0.9-preview&prerelease
#tool nuget:?package=Metalama.Extensions.HtmlWriter&version=2027.0.9-preview&prerelease
Metalama.Extensions.HtmlWriter
This package provides optional HTML code writing functionality for Metalama.
Installation
Add a reference to this package in your project:
<PackageReference Include="Metalama.Extensions.HtmlWriter" />
Features
When this package is referenced, Metalama can generate HTML output files showing the source code with syntax highlighting and diff visualization. This is useful for:
- Documentation generation
- Debugging aspect transformations
- Visualizing compile-time vs run-time code
Usage
Compile-time Pipeline
Enable HTML output in your project by setting the WriteHtml MSBuild property:
<PropertyGroup>
<MetalamaWriteHtml>true</MetalamaWriteHtml>
</PropertyGroup>
Aspect Tests
Enable HTML output in aspect tests by adding a metalamaTests.json file to your test project:
{
"WriteInputHtml": true,
"WriteOutputHtml": true
}
Symbols
To make the code navigable, the HTML files can identify the symbol of each identifier. Enable it with the
MetalamaWriteHtmlSymbols MSBuild property, or with the AddHtmlSymbols test option (// @AddHtmlSymbols in a test file):
<PropertyGroup>
<MetalamaWriteHtml>true</MetalamaWriteHtml>
<MetalamaWriteHtmlSymbols>true</MetalamaWriteHtmlSymbols>
</PropertyGroup>
Each identifier then gets one of these attributes, whose value is the documentation comment id of the symbol, as in the
commentId field of DocFx cross-reference maps:
data-def: the identifier declares the symbol.data-ref: the identifier references the symbol.
An overriding member also gets data-overrides, the id of the overridden member.
Locals, parameters, type parameters and local functions have no documentation id. Their identifiers get a key that is
unique in the file instead: data-local-def on the declaration and data-local-ref on each reference.
Without this package, the WriteHtml feature and related test options will throw an error with a message indicating that the package needs to be installed.
AI Coding Assistants
If you use an AI coding assistant such as Claude Code, install the Metalama AI Skills plugin. It gives the assistant access to the Metalama conceptual documentation, the API reference, and code samples.
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- Metalama.Framework.Sdk (>= 2027.0.9-preview)
- Metalama.Testing.AspectTesting (>= 2027.0.9-preview)
-
net10.0
- Metalama.Framework.Sdk (>= 2027.0.9-preview)
- Metalama.Testing.AspectTesting (>= 2027.0.9-preview)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Metalama.Extensions.HtmlWriter:
| Package | Downloads |
|---|---|
|
Metalama.Documentation.QuickStart
Contains trivial aspects used in Metalama's getting started documentation. Do not use in production code. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2027.0.9-preview | 55 | 11/25/2026 |
| 2027.0.8-preview | 109 | 11/22/2026 |
| 2027.0.7-preview | 119 | 11/18/2026 |
| 2027.0.6-preview | 124 | 11/11/2026 |
| 2027.0.5-preview | 117 | 10/30/2026 |
| 2027.0.4-preview | 154 | 10/13/2026 |
| 2027.0.3-preview | 174 | 9/16/2026 |
| 2027.0.2-preview | 132 | 9/10/2026 |
| 2027.0.1-preview | 138 | 9/7/2026 |
| 2026.1.33 | 172 | 11/16/2026 |
| 2026.1.32 | 145 | 11/10/2026 |
| 2026.1.31 | 155 | 10/29/2026 |
| 2026.1.30 | 193 | 10/13/2026 |
| 2026.1.29 | 212 | 10/2/2026 |
| 2026.1.28 | 175 | 9/16/2026 |
| 2026.1.27 | 180 | 9/10/2026 |
| 2026.1.26 | 181 | 9/5/2026 |
| 2026.1.25 | 211 | 8/21/2026 |
| 2026.1.24 | 228 | 8/13/2026 |
| 2026.1.23 | 158 | 8/10/2026 |