[Home](../) › [Blog](../blog) › Metalama 2026.0 Generally Available: Full Support for C# 14 and .NET 10

# Metalama 2026.0 Generally Available: Full Support for C# 14 and .NET 10

> Announcing the general availability of Metalama 2026.0: full support for C# 14 extension blocks, .NET 10, and Visual Studio 2026; event handler overriding; first-class tuple support; Claude Code skill for AI-assisted development.

Published: 2026-01-05 · Author: Gaël Fraiteur · Canonical: https://postsharp.net/blog/metalama-2026-0-ga

Metalama 2026.0 is now generally available! This major release brings full support for C# 14 (the most significant evolution of the C# language in years), along with .NET 10 SDK and Visual Studio 2026 compatibility. We're also closing one of the last feature gaps with PostSharp: the ability to override event handler invocations. And you're getting first-class support for tuple types.

Ready to try it? The packages are on [NuGet.org](https://www.nuget.org/packages/Metalama.Framework), and the Visual Studio extension is available from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=PostSharpTechnologies.PostSharp). 

For the complete list of changes, see the [release notes](https://doc.metalama.net/conceptual/release-notes/release-notes-2026-0). For even more detail, see the change notes for the releases [2026.0.11](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.11), [2026.0.10-rc](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.10-rc), [2026.0.9-rc](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.9-rc), [2026.0.8-rc](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.8-rc), [2026.0.7-rc](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.7-rc), [2026.0.6-rc](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.6-rc), [2026.0.5-preview](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.5-preview), [2026.0.4-preview](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.4-preview), [2026.0.3-preview](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.3-preview), [2026.0.2-preview](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.2-preview),
  [2026.0.1-preview](https://github.com/metalama/Metalama/releases/tag/release%2F2026.0.1-preview).

## C# 14 support

C# 14 introduces several language features, and Metalama 2026.0 supports all of them _in user code_:

- Extension blocks (see below)
- Null-conditional assignments
- `field` keyword in properties
- Partial constructors and events
- Compound assignment operators
- Simple lambda parameters with modifiers

However, some features are **not yet supported in aspects**:

- Null-conditional assignments in templates
- The `field` keyword in templates
- Generating run-time code for extension members via invoker interfaces
- Adding contracts to the receiver parameter of extension blocks
- Introducing new compound assignment operators
- Introducing parameters into partial constructors
- Introducing new extension blocks

## Extension blocks

Extension blocks are the headline feature of C# 14, letting you extend any type with new members. Metalama supports them:

- Extension blocks are modeled via the `IExtensionBlock` interface, which implements `INamedType` (`TypeKind = Extension`).
- They appear under `INamedType.ExtensionBlocks`.
- You can override extension members using the advising API or apply aspects via custom attributes.
- You can introduce new members into existing extension blocks.
- Introducing _new_ extension blocks is not yet supported.

Here's how to add logging to all extension methods in your project using a fabric:

```csharp
public class Fabric : ProjectFabric
{
    public override void AmendProject( IProjectAmender amender )
    {
        amender
            .SelectTypes()
            .SelectMany( t => t.ExtensionBlocks )
            .SelectMany( e => e.Methods )
            .AddAspectIfEligible<LogAttribute>();
    }
}
```

## Event handler overriding

You can now override event handler invocations, enabling patterns like "safe events" where each handler is isolated by exception handling. The `OverrideInvoke` method in `OverrideEventAspect` intercepts individual handler invocations.

Typical use cases:

- Safe events (exception isolation)
- Background or asynchronous event dispatch
- Event invocation logging

Here's an aspect that catches exceptions and removes faulty handlers:

```csharp
public class SafeEventAttribute : OverrideEventAspect
{
    public override dynamic? OverrideInvoke( dynamic? handler )
    {
        try
        {
            return meta.Proceed();
        }
        catch ( Exception e )
        {
            Console.WriteLine( e );
            meta.Target.Event.Remove( handler );
            throw;
        }
    }
}
```

Apply it to any event:

```csharp
public class Camera
{
    [SafeEvent]
    public event EventHandler? FocusChanged;

    private void OnFocusChanged()
    {
        this.FocusChanged?.Invoke( this, EventArgs.Empty );
    }
}
```

For details, see [Overriding events](https://doc.metalama.net/conceptual/aspects/advising/overriding-events).

## First-class tuple support

Previously, Metalama treated tuples as plain `INamedType` objects, with no access to element names or types. The new `ITupleType` interface changes that, making scenarios like packing method arguments for interceptors much cleaner:

```csharp
// Create a tuple type from method parameters.
var tupleType = TypeFactory.CreateTupleType( method.Parameters );

// Create a tuple instance.
var tupleExpression = tupleType.CreateCreateInstanceExpression( meta.Target.Parameters );

// Pass it to an observer.
_myObserver.OnMethodCalled( method.DeclaringType.FullName, method.Name, tupleExpression.Value );
```

## Metrics enhancements

- **LinesOfCode metric**: Three measurements (Logical, NonBlank, and Total).
- **Workspaces API**: Now officially supports metrics consumption.

## Visual Studio tooling improvements

We've refactored several background components of our VSIX. It's now more stable, consumes less CPU, and better utilizes your cores.

## Claude Code skill for AI-assisted development

We're introducing a Claude Code skill that gives Anthropic's AI assistant Metalama knowledge:

- Conceptual documentation
- API references
- Sample code and pattern libraries

Whether you're new to Metalama or tackling a complex scenario, Claude can now provide contextually relevant guidance for aspect development, templates, fabrics, and the code model.

The skill is available on the [Metalama.AI.Skills marketplace](https://github.com/metalama/Metalama.AI.Skills). For setup instructions, see [Configuring Claude Code](https://doc.metalama.net/conceptual/using/claude-code).

## Documentation updates

We've made these improvements:

- New: [Working with types](https://doc.metalama.net/conceptual/aspects/type-system)
- Improved: [Writing T# templates](https://doc.metalama.net/conceptual/aspects/templates)
- Updated: [Injecting dependencies into aspects](https://doc.metalama.net/conceptual/aspects/dependency-injection) (now covers cross-project DI)
- Updated: [Overriding events](https://doc.metalama.net/conceptual/aspects/advising/overriding-events)
- New: [Consuming code metrics](https://doc.metalama.net/conceptual/introspection/metrics) and [Custom metrics](https://doc.metalama.net/conceptual/sdk/custom-metrics)
- Enhanced API docs with integrated conceptual content

## Breaking changes

- .NET 6 SDK is no longer supported.
- Several API and behavioral changes. See the [release notes](https://doc.metalama.net/conceptual/release-notes/release-notes-2026-0) for details.

## What's next

With 2026.0 shipped, we'll focus on extending C# 14 support in aspects.

Found an issue or have a feature request? Let us know on [GitHub](https://github.com/metalama/Metalama/issues).

Happy meta-programming!

-gael

---

## Site navigation

- Index of the whole site: [llms.txt](../llms.txt)

