Sources

PM Metalama / PostSharp Blog
Blog

4stories
4 d agolatest
Metalama 2027.0
Redirect calls at build time
PMMetalama / PostSharp Blog Gaël Fraiteur 4 d ago

Metalama 2027.0 adds interceptors to redirect method calls at build time

Metalama 2027.0 introduces call-site interceptors that rewrite selected method calls at build time, so a method from a NuGet package or the .NET libraries can be wrapped without touching its source. The post walks through a retry example built from a T# template, a hand-written audit redirect, and the scoping rules. The feature is in preview from 2027.0.4-preview.

PostSharp 2027.0
Agents see the aspects
PMMetalama / PostSharp Blog Gaël Fraiteur 5 d ago

PostSharp 2027.0 gives AI coding agents the real API and build facts

PostSharp 2027.0 adds tooling that helps AI coding agents work correctly in PostSharp projects, including a plugin for Claude Code and Codex. The release also brings CLI commands that show which aspects were applied to a declaration after a build, per-message error documentation, and an aspect test framework. These are useful for .NET developers who write or maintain aspects.

PostSharp 2027.0
Aspects get DI services
PMMetalama / PostSharp Blog Gaël Fraiteur 6 d ago

PostSharp 2027.0 lets aspects receive services through constructor injection

PostSharp 2027.0 lets aspects request services from the dependency injection container. The build adds those services as constructor parameters of the enhanced class, so aspects no longer need a global service locator. Legacy code can migrate gradually, and PostSharp Caching can take its backend from the container too.

PostSharp 2027.0
Typed aspect advices
PMMetalama / PostSharp Blog Gaël Fraiteur Oct 23

PostSharp 2027.0 advice parameter binding removes boxing and allocations from aspects

PostSharp 2027.0 makes advice parameter binding public: aspect advices receive typed parameters instead of a MethodExecutionArgs object. That removes per-call heap allocations, boxing and casts on hot paths. Bindings are checked at build time, so mismatches fail the build rather than production.

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message