Skip to content

Releases: metalama/Metalama

Metalama 2026.1.27

Choose a tag to compare

@gfraiteur gfraiteur released this 10 Sep 11:08

Metalama 2026.1.27 is based on 2026.1.26, plus the following changes.

Enhancements

  • Updated the MessagePack library that is embedded in the design-time components to 2.5.302, which fixes two vulnerabilities reported against the previous version (CVE-2026-48109 and CVE-2026-48516).

Fixes

  • #1988 Fixed a design-time failure that disabled all aspects, diagnostics and suppressions in a project when an attribute target specifier was incomplete or misspelled, as it is while you type [property: ...].
  • #1994 Fixed a template compiler crash when a collection expression assigned to a run-time variable mixes a compile-time element and a run-time element.

Resources

Metalama 2027.0.2-preview

Pre-release

Choose a tag to compare

Metalama 2027.0.2-preview is based on 2027.0.1-preview and 2026.1.27, plus the following changes.

This release updates Metalama.Compiler to 2027.0.2-preview.

This release moves to the .NET software development kit 11.0.100-rc.1 and to Roslyn 5.11, the compiler that this kit bundles, and enables the C# 15 language version. Roslyn 5.11 publishes the six C# 15 features without the experimental marker, so this release delivers the code model and the advising support for unions, closed classes and extension indexers. It also adds the type facet mechanism to the code model, with the delegate, enum, record and union facets. This is a preview release, and it is not supported in production.

Breaking Changes

  • #2004, #2005 Updated to the .NET software development kit 11.0.100-rc.1 and to Roslyn 5.11, and enabled the C# 15 language version.
  • #2005 Metalama.Framework.Workspaces and the LinqPad driver now require a .NET software development kit whose MSBuild is 18.7.1 or later.

New

  • #1941 Added the code model of a C# 15 union: INamedType.IsUnion and the union facet, which exposes the union kind, the case types and the value property.
  • #1939 Added INamedType.IsClosed, which tells a class declared with the C# 15 closed modifier from an ordinary abstract class.
  • #1950 Added INamedTypeBuilder.IsClosed, so that an aspect can introduce a closed class.
  • #1949 Added support for C# 15 extension indexers, in advising and in introduction.
  • #1995 Added the type facet mechanism to the code model, with the delegate facet as its first facet.
  • #1996 Added the enum facet, which exposes the underlying type of an enum, its members and whether it carries System.FlagsAttribute.
  • #1997 Added the record facet, which names the members that the compiler synthesizes for a record.

Enhancements

  • #1922 Grouped the registered license keys by the minimal version of Metalama that can consume them, so that an earlier version installed on the same machine ignores a key it cannot understand.
  • #1927 Gave the language version warning the code LAMA0603 and a text that is true.

Fixes

  • #1979 Fixed the language version of compile-time code and of template bodies in a project that requests the preview version.
  • #1995 Fixed the eligibility rule of the advice that overrides the Invoke method of an event, which threw when the type of the event was not a delegate.

Resources

Metalama 2027.0.1-preview

Pre-release

Choose a tag to compare

Metalama 2027.0.1-preview is based on 2026.1.26, plus the following changes.

This release updates Metalama.Compiler to 2027.0.1-preview.

This is the first build of the 2027.0 line. It is built on Roslyn 5.10, the compiler bundled with the .NET SDK 11.0.100-preview.7, and it supports the .NET 10 and .NET 11 software development kits. The supported platform set is recorded as PB-2027.0 in platform-support.md. The supported target frameworks are .NET Framework 4.7.2 and later, .NET Standard 2.0 and 2.1, .NET 10 and .NET 11. Visual Studio 2022, .NET 8 and .NET 9 are no longer supported. This is a preview release, and it is not supported in production.

Breaking Changes

  • #1876, #1913 Removed explicit support for .NET 8 and .NET 9, in Metalama and in Metalama.Premium. The supported .NET SDK versions are now 10.0 and 11.0. A project that targets net8.0 or net9.0 resolves the netstandard2.0 asset and continues to build, but that configuration is no longer tested.
  • #1881 Metalama now builds on Roslyn 5.10, and the Roslyn 4.12 payload variant is removed. The lowest supported Roslyn version is 5.0, which is the version that Visual Studio 2026 and the current Rider provide. Visual Studio 2022 is therefore no longer supported.

New

  • #1829 Added the [Durable] contract and the analyzer that verifies it. [Durable] declares that a type, a member or a parameter is safe to hold across compilations, and the analyzer reports a member that pins a Compilation, a SyntaxTree, a SemanticModel, an ISymbol or a code model declaration. The analyzers are shipped in the Metalama.Framework package and report warnings without an opt-in.
  • #1872 Added the [ImmutableType] contract and the analyzer that verifies it, so an aspect, a fabric or a validator that keeps mutable state is reported as it is written instead of through a defect whose symptom is that one target receives another target's data.
  • #1864 Added support for a new kind of license key, signed with Elliptic Curve DSA and SHA-256, beside the existing kind signed with finite field DSA and SHA-1. The new kind is required on macOS under .NET 11, which removed the finite field DSA algorithm from the platform.
  • #1884 The build now reports LAMA0600 when the target framework, the .NET SDK or the Visual Studio version is outside the configuration matrix that Metalama tests. Set the MetalamaCheckSupportedPlatform property to False, or add LAMA0600 to NoWarn, to silence the message.
  • #1887 The packages whose supported platforms are stricter than the framework's now declare their own requirement through the MetalamaPlatformRequirement item, so LAMA0600 names the package that imposes the constraint. A single requirement can be excluded through the MetalamaSupportedPlatformExclusion item.
  • #1896 Raised the language version of templates and compile-time code to C# 14, which the Roslyn 5.0 floor now permits.
  • #1343 meta.Proceed() is now supported in a template that overrides a compiler-synthesized record member, such as Equals or GetHashCode. It previously threw NotSupportedException.
  • #1920 The binary log of a failed nested reference-assembly build, which LAMA0082 reports, can now be copied to a chosen directory, so that the failure can be diagnosed from a continuous integration agent whose temporary directory is not reachable.

Enhancements

  • #1873 The licence audit report now carries the user end device hash the way PostSharp computes it, so that a person who builds with both products is counted once across them. This affects the licence audit channel only, and not the anonymous usage channel.

Fixes

  • #1898 Fixed a failure at design time when the Roslyn version of the host is below the supported floor. Metalama now behaves as if it were not installed, instead of failing while extracting its payload.
  • #1928 Fixed the diagnostics that report an unsupported language version, which crashed instead of naming the version.
  • #1930 Fixed the code refactoring providers of Metalama, which were disabled in the editor after an implementation type was renamed.
  • #1932 Fixed two defects affecting C# 14 extension blocks: an attribute could not be added to a member of an extension block, and a validator registered on an extension block indexed no reference and reported nothing.
  • #1885 Fixed the restore of the temporary project of the reference assembly locator on a user machine while Metalama is built against a prerelease Roslyn, whose package is published on a prerelease feed rather than on nuget.org.
  • Metalama.Premium#88 Fixed the change-visibility code action on an interface member and on an indexer, and fixed the leading trivia of the accessibility keyword that it inserts.

Resources

Metalama 2026.1.26

Choose a tag to compare

@gfraiteur gfraiteur released this 05 Sep 17:14
e6df0f7

Metalama 2026.1.26 is based on 2026.1.25, plus the following changes.

This release updates Metalama.Compiler to 2026.1.18.

Enhancements

  • #1906 The clock, the work-item dispatch and the memory cache of a caching backend can now be substituted, so a custom backend can be tested without waiting for a duration. The substitutes are shipped in the Metalama.Patterns.Caching.TestHelpers package.
  • #1915 Documented the substitutable dependencies of the caching backend, in the caching documentation and in the README of the Metalama.Patterns.Caching.TestHelpers package.

Fixes

  • #1960 Fixed a design-time failure that disabled aspects in a project that references a project written in another language.
  • #1923 Fixed the silent loss of configuration file content when several versions of Metalama share the configuration files of the user profile. A version now preserves the JSON members that it does not declare, instead of removing them.
  • #1907 Fixed both layers of a layered caching backend reading and writing the same entries when the application registers a single IMemoryCache in its service container.
  • #1870 Fixed a design-time failure that made a compile-time project unavailable when one of the assemblies it references could not be loaded. The diagnostic manifest is now built from the types that did load, and the condition is reported as a warning.
  • #1869 Fixed INamedTypeBuilder.IsPartial, which was ignored. An introduced type is now declared partial when the aspect requests it.
  • #1867 Fixed a design-time crash when an aspect reads a generic type whose type argument cannot be resolved, which happens while a using directive is missing or a package is being restored.
  • #1866 Fixed the MetalamaTraceLicensing property, which produced no licensing trace in the build log.
  • #1858 Fixed a design-time crash in attribute discovery, triggered by an edit that replaces the carriage return of a CR LF pair.

Resources

Metalama 2026.1.25

Choose a tag to compare

@gfraiteur gfraiteur released this 21 Aug 07:01

Metalama 2026.1.25 is based on 2026.1.24, plus the following changes.

This release updates Metalama.Compiler to 2026.1.17.

Enhancements

  • #1865 Improved the detection of a GitHub Actions runner, which no longer has to be a parent process of the build, so that the unattended license is again granted when the build runs in a reused MSBuild node. Each continuous integration server is now recognized from an environment variable specific to that server together with the process of its agent.

Fixes

  • #1856 Fixed a design-time crash that occurred when a fabric held a declaration from an earlier version of the project. An aspect instance whose target no longer exists in the current compilation is now skipped instead of failing the analysis.
  • #1859 Fixed an unlicensed build failing with MSB4018 after having reported LAMA0806, which occurred when the notification inviting the user to register a license could not be displayed. An unlicensed build now reports LAMA0806 alone. A malformed license key is now reported as an invalid key instead of throwing.
  • #1861 Fixed the failure to use any license on macOS with .NET 11, where creating the licensing authority keys threw PlatformNotSupportedException while the licensing services were registered. The keys are now created only when the signature of a license key is verified, so the unsigned licenses, which are the trial, community, anonymous and unattended licenses, now work on that platform. A signed license key is still refused on macOS with .NET 11.

Resources

Metalama 2026.1.24

Choose a tag to compare

@gfraiteur gfraiteur released this 13 Aug 03:10

Metalama 2026.1.24 is based on 2026.1.23, plus the following changes.

This release updates Metalama.Compiler to 2026.1.16.

Enhancements

  • #1811 Improved the compile-time performance of durable references, which now keep the original reference during a build and are collapsed to an identifier only at design time, where an identifier is required. The MetalamaDurableRefKind MSBuild property restores the previous behavior.

Fixes

  • #1847 Fixed a build failure, or a design-time analysis failure, reported as Cannot acquire the global configuration mutex in 30s. The locking system of the configuration manager has been refactored: reading a configuration file now takes no lock, each configuration file has its own lock instead of a single lock for the whole directory, and an update is now a single transaction instead of a read-modify-write repeated up to ten times. A lock that cannot be acquired produces a warning instead of failing the build. The METALAMA_LEGACY_CONFIGURATION_LOCK environment variable restores the previous locking scheme.
  • #272 Fixed a build failure on macOS and Linux reported as The system cannot open the device or file specified. : 'Global\Metalama.Configuration'. When the operating system cannot create a machine-wide named lock, Metalama now reports the condition once and continues with a lock local to the current process, instead of failing the build.

Resources

Metalama 2026.1.23

Choose a tag to compare

@gfraiteur gfraiteur released this 10 Aug 08:37

Metalama 2026.1.23 is based on 2026.1.22, plus the following changes.

This release updates Metalama.Compiler to 2026.1.15.

Breaking Changes

  • #1844 The symbol of a tuple type with named elements now carries the element names. As a consequence, two tuple types differing only by the names of their elements are no longer equal, at any depth, which affects Comparers.Default, Comparers.IncludeNullability and the structural comparison of two IRef. Code that means to ask whether one type can be used where the other is expected should use IsConvertibleTo with ConversionKind.Identical.
  • #1846 ConversionKind.Identical now reports an identity conversion between object and object?, and between two tuples differing only by the names of their elements, as the C# language does. The new ConversionKind.Equal requests the previous, stricter relation.

Fixes

Design time

  • #1832 Fixed a design-time crash occurring when the .NET SDK cannot be resolved for a project. Metalama now stops without reporting a diagnostic, leaving the C# compiler to report the condition.
  • #1833 Fixed a TypeLoadException at design time when two Metalama versions are loaded in the same Visual Studio process. An assembly embedded in a Metalama build is now bound to its exact version.
  • #1848 Fixed a design-time crash that made a project lose all of its Metalama diagnostics and generated documents when a fabric configures hierarchical options on a declaration of another file, or when an aspect adds an annotation to one.

Nullability and tuples in the code model

  • #1835 Fixed a build failure reported as LAMA0001 when an [Inheritable] aspect is applied to an open generic type with a struct constraint and another project derives from that type. This was a regression of 2026.1.22, and the audit that followed it produced the items below.
  • #1837 #1838 Fixed the nullability marker of a SerializableTypeId, which is now derived from the whole type instead of its outermost position. A value type or an annotated reference type no longer loses the nullability of its type arguments, and the identifier of a type is now the same however it is computed.
  • #1839 #1845 Fixed the nullability of a type obtained by resolving a SerializableTypeId: a type argument no longer loses its annotation, and a type resolved from an identifier written in an unannotated context is now oblivious rather than non-nullable.
  • #1841 Fixed the loss of the tuple element names when a SerializableTypeId is resolved.
  • #1842 Fixed the resolution of the SerializableTypeId of a tuple of eight or more elements, which produced a ValueTuple that was not a tuple, or reported LAMA0020.
  • #1840 Fixed ToNullable(), ToNonNullable() and StripNullabilityAnnotation(), which had no effect on a type introduced by an aspect.
  • #1843 Fixed the SpecialType of a nullable value type built over a type introduced by an aspect, which was reported as Nullable_T instead of None.

Resources

Metalama 2026.1.22

Choose a tag to compare

@gfraiteur gfraiteur released this 05 Aug 16:32

Metalama 2026.1.22 is based on 2026.1.21, plus the following changes.

This release updates Metalama.Compiler to 2026.1.14.

This is a large reliability release. Its main themes are the design-time memory growth reported by users, a series of design-time crashes reported through crash reports, the reference-assembly build that backs the compile-time assembly locator, and the telemetry pipeline, which turned out to have been silent for over a year.

Breaking changes

  • Metalama.Community#81 [AutoCancellationToken] now adds a new overload that takes a CancellationToken instead of widening the signature of the existing method, so that existing callers keep compiling.

Design-time memory

  • #1804 Fixed the unbounded memory growth of the Roslyn analysis process when editing a solution that uses Metalama. The individual defects are listed below.
  • #1793 Fixed three distinct paths by which the analysis process kept Roslyn compilations alive after the user had replaced them.
  • #1796 Fixed the unbounded accumulation of cross-project validators in the design-time pipeline results, which grew on every pipeline run.
  • #1797 Fixed the retention of one Roslyn compilation per project, for the whole editing session, caused by a transitive aspect instance produced by a pulled constructor parameter.
  • #1803 Fixed the retention of the initial Roslyn compilation of an editing session by aspects declared in the project's own source whose templates have parameters of source types.
  • #1808 Fixed the retention of the source compilation by the cacheable template reflection context of the long-lived pipeline configuration.
  • #1802 Added the opt-in MetalamaDiagnoseMemoryLeaks diagnostic, which reports the fields and captured variables of your own fabrics that hold a reference to a Roslyn compilation.
  • [Metalama.Premium] Architecture rules no longer pin the compilation they were applied in; they now hold their types as durable references.

Design-time reliability

  • #1742 Fixed the assumption that a syntax tree's file path is unique in a compilation, which broke projects that use linked files or source generators that emit colliding hint names.
  • #1768 Fixed a design-time crash affecting projects with linked or generated files, which aborted aspect diagnostics and generated code for the whole project.
  • #1748 Fixed a design-time crash when splitting pipeline results by syntax tree in a project that consumes a transitive aspect from a referenced project.
  • #1752 Fixed a transitive aspect that reached a consumer project through a deserialized manifest never being applied, silently and without a diagnostic.
  • #1759 Fixed a design-time crash when a fabric is declared in an assembly that is not among the project's run-time references.
  • #1767 Fixed a design-time crash while generating the attributes of an introduced constructor.
  • #1757 Fixed a permanent hang of the design-time pipeline on a project that references an assembly built with a pre-2026.1 version of Metalama.
  • #1749 Fixed a crash when two compile-time projects in the same closure have the same assembly name.
  • #1750 Fixed a design-time crash when a project has duplicate or empty project-reference identities.
  • #1743 Fixed the abort of pipeline initialization when two aspect weavers or two assemblies claim the same identity.
  • #1820 Fixed a design-time initialization failure when the TargetFrameworkAttribute of Metalama.Framework cannot be read.

Build and the compile-time assembly locator

  • #1741 Fixed LAMA0001: Cannot determine the compile-time language version in Visual Studio, on the Razor declaration pass of a Blazor project that references a project using Metalama.
  • #1740 Fixed an intermittent LAMA0001 caused by the nested reference-assembly build timing out after 120 seconds.
  • #1744 Environmental failures of the nested reference-assembly build (feed authentication, NU1302, an SDK or MSBuild mismatch) are now reported as such instead of as a Metalama crash.
  • #1745 Fixed the failure of the nested reference-assembly build when a global.json pins an SDK version that is not installed.
  • #1746 Fixed the reporting of a nested reference-assembly build whose child process crashes with an access violation (MSB6006).
  • #1747 Fixed NU1101 on the restore of the nested reference-assembly build when packageSourceMapping pins Microsoft.CodeAnalysis.* to an internal feed.
  • #1789 Fixed the MetalamaCompileTimeTargetFrameworks property losing everything after the first semicolon, which then crashed the build with LAMA0001.
  • #1788 Fixed the Metalama.AssemblyLocator.Build.targets hook never being imported, so that only the .props hook was ever effective.

Telemetry, diagnostics and configuration

  • #1764 Fixed the telemetry upload never starting, which silently discarded usage reports, license-audit reports and exception reports for over a year.
  • #1751 Fixed exception reports being offered for approval only once, so that a report missed or dismissed was never offered again.
  • #1765 Background task failures are now logged instead of being swallowed silently.
  • #1777 Fixed the silent loss of a diagnostics.json file that has no logging section.
  • #1778 Fixed the debugging, crashDumps and profiling sections of diagnostics.json being silently ignored.
  • #1772 Fixed an exception when the crash-dump settings of diagnostics.json are read or saved.
  • #1766 Fixed the crash of the metalama license list, metalama license register-trial and metalama license unregister commands on an incomplete licensing.json.

Security

  • #1769 The Backstage setup web server now authenticates its clients, so that another local user of the same machine can no longer drive the current user's Metalama configuration. This matters on terminal servers, shared build agents and multi-user Linux hosts.
  • [Metalama.Premium] Updated System.Security.Cryptography.Xml to 8.0.4, which fixes CVE-2026-50648.

Code model

  • #1806 The IDurableRef interface family is now public, so that you can store a typed reference to a declaration without keeping the whole compilation in memory, and declare in a signature that an API does not retain a compilation.
  • #1828 Fixed a durable reference to a declaration introduced by the current aspect not resolving in the compilation that aspect operates on.
  • #1827 Fixed the resolution of a declaration introduced into a namespace whose name is also declared by a referenced assembly.
  • #1812 IType.ToDisplayString now renders the nullable annotation of a type parameter, so that a nullable type and its non-nullable counterpart no longer produce the same string.

Caching

  • #1815 Fixed a race condition that could cause cached values to be lost when a Redis connection was disposed.
  • #1818 Fixed a hang of the Redis caching background task queue when a task completed while another was being enqueued.

Metalama.Community

  • Metalama.Community#109 Fixed [AutoCancellationToken] being silently ignored on a nested type.
  • Metalama.Community#105 Fixed [AutoCancellationToken] producing CS0115 or CS0111 by appending a parameter to overrides, interface implementations and existing overloads.
  • Metalama.Community#104 Fixed a crash of the [AutoCancellationToken] weaver on invocations inside operators and field-like events.
  • Metalama.Community#101 Fixed [Costura] emitting invalid C# in the assembly-resolver code generated for a pro...
Read more

Metalama 2026.1.21

Choose a tag to compare

@gfraiteur gfraiteur released this 21 Jul 07:25

Metalama 2026.1.21 is based on 2026.1.20, plus the following changes.

This release updates Metalama.Compiler to 2026.1.13.

Enhancements

  • #1738 Crash reports now capture ReflectionTypeLoadException.LoaderExceptions.

Fixes

  • #1710 Fix a design-time InvalidCastException when contract options were merged across two TFM-specific compile-time assemblies.
  • #1724 Fix a permanent hang of the design-time RPC server when a client disconnected while connecting.
  • #1727 The compile-time compilation no longer force-defines the NETSTANDARD_2_0 preprocessor symbol.
  • #1732 Remove the spurious "System.Private.CoreLib is not a known assembly name" warning from the serialization log.
  • #1715 Telemetry is now correctly disabled for a known project path located outside any git repository.
  • #1714 Fix a lost wakeup and a double activation in AwaitableEvent, which could cause caching invalidation to hang.
  • Metalama.Community#98 [Virtualize] on an abstract class no longer marks abstract members as virtual (CS0503).

Resources

Metalama 2026.1.20

Choose a tag to compare

@gfraiteur gfraiteur released this 15 Jul 08:10

Metalama 2026.1.20 is based on 2026.1.19 and 2026.0.25, plus the following changes.

This release updates Metalama.Compiler to 2026.1.12 (build and infrastructure updates only).

Fixes

  • #1722 Fixed a FileNotFoundException when invoking a compile-time extension method defined in a referenced package, caused by a stale compile-time cache after a dependency version change.

Resources