Metalama.Framework
0.5.76-preview
Prefix Reserved
See the version list below for details.
dotnet add package Metalama.Framework --version 0.5.76-preview
NuGet\Install-Package Metalama.Framework -Version 0.5.76-preview
<PackageReference Include="Metalama.Framework" Version="0.5.76-preview" />
<PackageVersion Include="Metalama.Framework" Version="0.5.76-preview" />
<PackageReference Include="Metalama.Framework" />
paket add Metalama.Framework --version 0.5.76-preview
#r "nuget: Metalama.Framework, 0.5.76-preview"
#:package Metalama.Framework@0.5.76-preview
#addin nuget:?package=Metalama.Framework&version=0.5.76-preview&prerelease
#tool nuget:?package=Metalama.Framework&version=0.5.76-preview&prerelease
The Metalama.Framework package is the principal package of Metalama. Reference this package if you want to use Metalama in your code.
Referencing this package replaces the compiler with Metalama.Compiler, a shallow fork of Roslyn that adds an extension point to transform the syntax trees.
What is Metalama?
Metalama is a modern, Roslyn-based meta-programming framework C# with focus on aspect-oriented programmning, code generation and code validation.
It is an extension of the Microsoft "Roslyn" C# compiler that allows you to automatically transform your source code at build time or design time based on encapsulated code transformations called aspects. Metalama can be used for aspect-oriented programming, code generation, or architecture validation.
Metalama is intended to replace the MSIL-based stack that is now the foundation of PostSharp.
Documentation and examples
| Link | Description |
|---|---|
| Documentation | Conceptual and API documentation. |
| Try Metalama | Try Metalama from your browser. Based on https://try.dot.net/ |
| Metalama.Samples | A dozen of examples in a GitHub repo. |
| Metalama.Open.AutoCancellationToken | A low-level Metalama aspect that adds cancellation tokens to your method declarations and your method calls. |
| Metalama.Open.Virtuosity | A low-level Metalama aspect that makes your methods virtual. (A fork of Virtuosity.Fody.) |
| Metalama.Open.Costura | A low-level Metalama aspect that embeds dependent assemblies as managed resources. (A fork of Costura.Fody.) |
| Metalama.Framework.Extensions | Open-source extensions to Metalama.Framework. |
Metalama components
For a diagram of the multiple packages that compose Metalama, see https://doc.metalama.net/deployment/packages.
Feedback and support
If you have any feedback regarding Metalama, please open an issue, start a discussion, or contact us directly at hello@postsharp.net.
You can also join our Slack community and ask your technical questions in real time.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Metalama.Compiler (>= 4.4.1011-preview)
- Metalama.Framework.Redist (>= 0.5.76-preview)
- Microsoft.CSharp (>= 4.7.0)
NuGet packages (30)
Showing the top 5 NuGet packages that depend on Metalama.Framework:
| Package | Downloads |
|---|---|
|
Metalama.Extensions.DependencyInjection
An official and open-source Metalama extension that allows aspects to consume dependencies from an arbitrary dependency injection framework. |
|
|
Tofi.Framework.Aspects
Package Description |
|
|
Metalama.Patterns.Contracts
Contract-Based Programming (or Design-by-Contract) with custom attributes such as [NotNull] or [Url] thanks to Metalama: pre-conditions, post-conditions and invariants. |
|
|
Shinya.Core
Shinya.Framework |
|
|
Metalama.Extensions.Multicast
An official and open-source Metalama extension that emulates PostSharp multicasting. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.1.9-preview | 1,053 | 4/17/2026 |
| 2026.1.8-preview | 4,299 | 4/13/2026 |
| 2026.1.7-preview | 5,901 | 3/31/2026 |
| 2026.1.6-preview | 1,063 | 3/28/2026 |
| 2026.1.5-preview | 862 | 3/26/2026 |
| 2026.1.4-preview | 943 | 3/22/2026 |
| 2026.1.3-preview | 1,968 | 3/7/2026 |
| 2026.1.2-preview | 1,273 | 2/11/2026 |
| 2026.1.1-preview | 957 | 2/5/2026 |
| 2026.1.0-preview | 976 | 2/1/2026 |
| 2026.0.21 | 2,083 | 4/17/2026 |
| 2026.0.20 | 6,837 | 3/25/2026 |
| 2026.0.19 | 1,321 | 3/24/2026 |
| 2026.0.18 | 1,943 | 3/21/2026 |
| 2026.0.17 | 11,156 | 3/12/2026 |
| 2026.0.16 | 27,836 | 1/24/2026 |
| 2026.0.15 | 9,518 | 1/14/2026 |
| 2026.0.14 | 1,025 | 1/13/2026 |
| 2026.0.13 | 1,583 | 1/12/2026 |
| 0.5.76-preview | 2,442 | 1/6/2023 |