What is Metalama?
Metalama helps C# developers improve their productivity and code quality. It offers the following benefits:
- Reduce boilerplate by generating it dynamically during compilation thanks to aspect-oriented programming. Your source code remains crystal-clear.
- Verify code in real time against architecture, patterns, and conventions. No need to wait for code reviews.
- Provide coding assistance to your team with customized feedback and suggestions.
- Do it by your rules. Automate your own implementation patterns and architecture guidelines.
Based on Roslyn, Metalama integrates with most C# IDEs and editors including Visual Studio, Rider, and Visual Studio Code.
Developed since August 2020, it has been serving real users since July 2022. We have integrated their feedback and fixed countless bugs to reach this point where we can now say that Metalama is ready for production
You can learn more about Metalama and its features on this website.
Top Features
T# Templates
Leverage the power of T#, a markup-free, C# syntax-compatible template language with Visual Studio syntax highlighting.
Override Anything
Unlike proxy-based AOP frameworks, Metalama is not limited to interfaces and virtual methods.
Aspect Inheritance
Automatically apply aspects to child classes by marking parent classes — even across projects.
Fabrics
Implement compile-time project entry points for aspect addition or code validation.
Intellisense
Access aspect-introduced code in real-time, without recompiling.
Instant Diagnostics
Receive real-time error and warning notifications from aspects in the editor.
Diff Preview
Seamlessly compare source and transformed code within Visual Studio.
CodeLens
Quickly identify applied aspects in the editor even when it is not obvious from source code.
Custom Fixes & Suggestions
Develop team-specific code fixes linked to diagnostics.
Syntax Highlighting
Easily distinguish meta code with T# color-coding.
Debugging Flexibility
Select between stepping into the transformed code or staying within the source code.
Testing Framework
Efficiently test aspects on various target declarations with the integrated Visual Studio or Rider test runner.
Querying Interactively
Use the Linqpad driver to query your codebase interactively like a database and analyze the behavior of your aspects and fabrics.
No Vendor Lock-In
Export transformed code and revert to vanilla C# anytime.
Extensible with Roslyn
Overcome the limitations of Metalama and write transformations directly with Roslyn.
Open-Source Extensions
Access a range of published extensions and samples under open-source licenses.
Metalama vs PostSharp
While Metalama is the successor to PostSharp, it is not yet a replacement, and migration from PostSharp is not recommended at this time unless all features required by your projects are available in Metalama. For more details, please see our migration guide.
PostSharp is still being maintained and supported, as demonstrated by the recent release of PostSharp 2023. If you are a PostSharp user, we suggest you consider Metalama for new projects. Your PostSharp license already includes Metalama.
Try Metalama today
If you’re ready to transform the way you write code, get started in these three steps:
-
Explore the examples and try them in the online sandbox.
-
Install the Metalama Tools for Visual Studio. It’s optional, but we recommend it, especially if you’re just starting.
-
Clone the Metalama.Samples repo, and start exploring!
Special Promotion
To celebrate the release of Metalama, we are offering a 50% discount on all Metalama licenses until the end of July. Don’t miss this limited-time opportunity to start using Metalama at a discounted price.
Summary
Today we released Metalama, an innovative meta-programming framework aimed at elevating C# developers’ productivity and refining code quality. Now production-ready, Metalama provides a wealth of features such as T# templates, aspect inheritance, fabrics, instant diagnostics and code fixes, and broad compatibility with multiple C# IDEs. While not an outright replacement for PostSharp, it is the ideal choice for new projects. Don’t miss the limited-time 50% discount on all Metalama licenses, available until the end of July, and embark on a transformative coding journey with Metalama today!