Metalama 2026.1.22
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 aCancellationTokeninstead 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
MetalamaDiagnoseMemoryLeaksdiagnostic, 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
TargetFrameworkAttributeofMetalama.Frameworkcannot be read.
Build and the compile-time assembly locator
- #1741 Fixed
LAMA0001: Cannot determine the compile-time language versionin Visual Studio, on the Razor declaration pass of a Blazor project that references a project using Metalama. - #1740 Fixed an intermittent
LAMA0001caused 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.jsonpins 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
NU1101on the restore of the nested reference-assembly build whenpackageSourceMappingpinsMicrosoft.CodeAnalysis.*to an internal feed. - #1789 Fixed the
MetalamaCompileTimeTargetFrameworksproperty losing everything after the first semicolon, which then crashed the build withLAMA0001. - #1788 Fixed the
Metalama.AssemblyLocator.Build.targetshook never being imported, so that only the.propshook 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.jsonfile that has nologgingsection. - #1778 Fixed the
debugging,crashDumpsandprofilingsections ofdiagnostics.jsonbeing silently ignored. - #1772 Fixed an exception when the crash-dump settings of
diagnostics.jsonare read or saved. - #1766 Fixed the crash of the
metalama license list,metalama license register-trialandmetalama license unregistercommands on an incompletelicensing.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.Xmlto 8.0.4, which fixes CVE-2026-50648.
Code model
- #1806 The
IDurableRefinterface 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.ToDisplayStringnow 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]producingCS0115orCS0111by 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 project that embeds an unmanaged assembly. - Metalama.Community#103 Fixed the
[Costura]IncludeDebugSymbolsoption having no effect, and the precedence of its collection options when they are set at several levels.
Resources
- Milestone
- Full Changelog: release/2026.1.21...release/2026.1.22