Welcome to Metalama!

Metalama is PostSharp’s open-source patterns & architecture toolkit for C#. Define your team’s patterns once: the compiler writes the repetitive parts at build time and enforces your rules as you type. Our motto: If it’s repetitive, it can be automated. Say goodbye to boilerplate, and hello to clean, maintainable, DRY code.

Metalama collects usage data to help us improve your experience. This data is securely gathered by PostSharp Technologies and handled in accordance with their privacy policy. If you prefer not to share this data, you can opt out: set the METALAMA_TELEMETRY_OPT_OUT environment variable to true in your shell, by adding a properly configured metalama.json file to your repo root, or use the metalama telemetry CLI tool. For detailed instructions, visit our telemetry documentation.

Free Email Course & Newsletter

Subscribe for release news and a monthly status report:

Install Visual Studio Tools for Metalama

The Visual Studio Tools for Metalama show what aspects do to your code:

  • CodeLens Integration
    Identify applied aspects directly in the editor, even when they aren’t visible in the source code.

  • Metalama Diff
    Compare source and transformed code in Visual Studio to see the impact of your aspects.

  • Syntax Highlighting
    Distinguish meta-code with T# syntax highlighting.

  • Aspect Explorer
    Explore all aspects in your solution and see how they influence the source code, providing a comprehensive view of your project.

These tools are available as a premium feature and are free for individuals, non-commercial use, open-source development, and companies with up to 3 developers.

Getting Started with Metalama

Get started:

  • Using Metalama: Start here if, like most developers, you will use Metalama but won’t author your own aspects.
  • Building Aspects: Ready to build your own aspects? This is your launchpad.
  • Metalama Marketplace: Pre-built aspect libraries to save time.
  • Use Cases: Learn when Metalama is the right tool for the job (and when it isn’t).