[Home](../) › [Blog](../blog) › Metalama 2024.0 Generally Available: .NET 8 and C# 12

# Metalama 2024.0 Generally Available: .NET 8 and C# 12

> Metalama 2024.0 is here, now with support for C# 12, multi C# version support, and deterministic build for all Metalama assemblies.

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

Metalama 2024.0 is now generally available. This release primarily focuses on support for C# 12, along with a few tasks remaining from previous releases when we made the Metalama source code available.

Note that we are simultaneously releasing [PostSharp 2024.0](https://postsharp.net/blog/postsharp-2024-0-ga).

## Support for C# 12

We've merged Roslyn 4.8 into `Metalama.Compiler`, our open-source branch of Roslyn adding code transformers.

Next, we updated and tested `Metalama.Framework` to support the following additional C# features:

   * Default lambda parameters,
   * Inline arrays in run-time code,
   * `nameof`: Access to instance members from a static context,
   * Primary constructors,
   * Type aliases,
   * Collection expressions (also known as collection literals) like `[1,2,..array]`,
   * `AppendParameter` advice (utilized in dependency injection scenarios) in primary constructors,
   * Primary constructor parameters in initializer expressions.

## Multi C# version support

Metalama 2024.0 is our first version supporting multiple versions of C#.

* Metalama uses different C# code generation patterns based on the C# version of the current project. We support versions 10, 11, and 12, the latest version that came with .NET 8.
* Metalama identifies the version used by each T# template and will report an error if a template is used in a project targeting a lower version of C# than required. The new MSBuild property `MetalamaTemplateLanguageVersion` restricts the version of C# that can be used in templates. Define this property to prevent the accidental use of a higher version of C# than intended.
* At present, there's no way for a template to conditionally generate code patterns according to the C# version of the target project.

## Other improvements

* **Deterministic build** is now implemented for all Metalama assemblies. This feature allows users to verify that the released binaries were indeed built from our source code. The only differences between the official assemblies and your own builds should be the strong-name and Authenticode signatures. Please note that building Metalama from source code requires a source subscription, available for an additional fee.
* **Symbol packages**: We've now published symbol packages for all Metalama NuGet packages, enabling source code debugging via SourceLink.
* **Warnings and errors deduplication**. Currently, we do not support this in the user API.
* **Licensing**: Aspect inheritance is now allowed for all license types.

## Breaking changes

In the `RefKind` enum, `In` and `RefReadOnly` are no longer synonymous.

## In Progress

We're currently working on the following projects, but they are not yet stable:

* [Metalama.Patterns.Observability](https://github.com/metalama/Metalama.Patterns/tree/HEAD/src/Metalama.Patterns.Observability) is an aspect implementing the `INotifyPropertyChanged` interface. It supports computed properties and child objects.
* [Metalama.Patterns.Xaml](https://github.com/metalama/Metalama.Patterns/tree/HEAD/src/Metalama.Patterns.Xaml) are aspects implementing XAML commands and dependency properties.

## Changelogs

For a more detailed list of changes and bug fixes, please refer to the changelogs:

- [2024.0.5-rc](https://github.com/orgs/metalama/discussions/252)
- [2024.0.4-rc](https://github.com/orgs/metalama/discussions/249)
- [2024.0.3-preview](https://github.com/orgs/metalama/discussions/247)
- [2024.0.2-preview](https://github.com/orgs/metalama/discussions/241)
- [2024.0.1-preview](https://github.com/orgs/metalama/discussions/238)

## Conclusion

Metalama 2024.0 is now stable. You can safely use every feature Microsoft released seven weeks ago. Join our [Slack community](https://www.postsharp.net/slack) and tell us what you build.

P.S. We are partnering with SlashData. Please participate in the [Developer Nation Survey](https://developereconomics.net/?member_id=postsharp) if you haven't done it.

---

## Site navigation

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

