Skip to main content
.NETStandard2.0

A commercial extension to Metalama.Framework that allows you to validate code and code references.

Published
Feb 5, 2026
8mo ago
Total Downloads
24.1K
24,055

Install

dotnet add package Metalama.Extensions.Validation --version 2026.1.1-preview
ProductVersions
.NET Standard
netstandard2.0

README

Metalama Logo

About

The Metalama.Extensions.Validation package extends Metalama.Framework with APIs that allow to validate code. Its most important and unique feature is the ability to validate code references (i.e. usages or dependencies).

This package provides a base API from which concrete validation rules can be built.

Features

  • Validate code references (i.e. code usages or dependencies).
  • Validate declarations before or after aspects have been applied.
  • Warnings appear as familiar C# warnings.
  • Immediate feedback as you type in the IDE.
  • Warnings can be suppressed using the standard mechanisms such as #pragma warning disable.
  • Extensible through Metalama.Framework or Roslyn.

License

This package is a commercial extension of the open-source Metalama.Framework and requires a Metalama Professional license.

Principal Types

  • ValidationQueryExtensions provides the Validate extension method to the IQuery interface exposed by aspects and fabrics. This methods allows to validate a declaration, possibly before or after it has been modified by aspects.

  • ReferenceValidationQueryExtensions provides the ValidateInboundReference methods to the IQuery interface exposed by aspects and fabrics. It allows to validate code that references the target declaration.

Documentation

Related Packages

Changes from Previous Version

No structural changes between v2026.1.0-preview and v2026.1.1-preview.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.