Metalama.Framework 2026.1.21

Prefix Reserved
dotnet add package Metalama.Framework --version 2026.1.21
                    
NuGet\Install-Package Metalama.Framework -Version 2026.1.21
                    
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="Metalama.Framework" Version="2026.1.21" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Metalama.Framework" Version="2026.1.21" />
                    
Directory.Packages.props
<PackageReference Include="Metalama.Framework" />
                    
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 Metalama.Framework --version 2026.1.21
                    
#r "nuget: Metalama.Framework, 2026.1.21"
                    
#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 Metalama.Framework@2026.1.21
                    
#: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=Metalama.Framework&version=2026.1.21
                    
Install as a Cake Addin
#tool nuget:?package=Metalama.Framework&version=2026.1.21
                    
Install as a Cake Tool

Metalama by PostSharp

An open-source patterns & architecture toolkit for C#.

Metalama lets you define your team's patterns once: the compiler writes the repetitive parts at build time and enforces your rules as you type.

Why Metalama?

  • Write the pattern once, apply it everywhere: Aspects generate the repetitive code at compile time; the boilerplate never lands in the repo, so it never needs review or maintenance.
  • Enforce architecture as you type: Dependency rules, naming conventions, and pattern guidelines in plain C#, with real-time IDE feedback long before the pull request.
  • Stay consistent in the AI era: Hand-written or AI-generated, every line is checked against your rules; a pattern change is one file edit and the whole codebase follows at the next build.

Built on Roslyn by the PostSharp team, who have been doing compiler-level meta-programming in .NET since 2004.

When to use it?

Metalama is ideal for:

  • Large projects: Automate repetitive patterns across dozens of entities and hundreds of properties or methods.
  • Large teams: Align developers on consistent patterns and practices.
  • Long lifecycle projects: Maintain quality over years of development.

Its main use cases are:

License

Metalama is vendor-led open source: built and maintained by full-time engineers, funded by commercial licenses.

The core framework, which is the large majority of the codebase, is released under the MIT license. It cannot be taken away, relicensed, or paywalled.

Some optional extensions and IDE tooling are released under a proprietary license. 💎

Features

Resources

Quick Start

  1. Add the Metalama.Framework package to your project:

    dotnet add package Metalama.Framework
    
  2. Optionally, install Metalama Tools for Visual Studio Extension. It's free for individuals, non-commercial uses, and companies with up to 3 users.

  3. Explore the Metalama Marketplace for ready-made aspects or examples.

  4. Follow the Getting Started guide to create your first aspect.

Building Metalama from Source

Please check instructions here.

Contributing

Contributions are accepted through the following channels:

For more details, see Contributing to Metalama.

Support

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Metalama.Extensions.Multicast

An official and open-source Metalama extension that emulates PostSharp multicasting.

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.1.21 0 7/21/2026
2026.1.20 1,807 7/15/2026
2026.1.19 8,138 6/27/2026
2026.1.18 29,104 6/10/2026
2026.1.17 4,961 6/5/2026
2026.1.16 1,587 6/3/2026
2026.1.15-rc 2,882 5/15/2026
2026.1.14-rc 1,178 5/13/2026
2026.1.13-preview 904 5/13/2026
2026.1.12-preview 1,211 5/12/2026
2026.1.11-preview 1,365 5/6/2026
2026.1.10-preview 1,669 4/29/2026
2026.1.9-preview 1,310 4/17/2026
2026.1.8-preview 28,839 4/13/2026
2026.0.25 987 6/30/2026
2026.0.24 922 6/27/2026
2026.0.23 15,205 5/15/2026
2026.0.22 8,848 4/29/2026
2026.0.21 20,597 4/17/2026
2025.1.18 930 6/30/2026
Loading failed