Open sandboxFocusImprove this doc

What's New in PostSharp 2026.0

PostSharp 2026.0 introduces support for .NET 10.0 and C# 14.0. It also removes support for obsolete target frameworks and features.

Note

Please note that this release includes several breaking changes. Refer to Breaking Changes in PostSharp 2026.0 for more detailed information.

Support for .NET 10 and C# 14

We've added support for .NET 10 SDK to all packages.

In C# 14, the only change impacting PostSharp was extension blocks.

Extension blocks

C# 14 introduces extension blocks, a new syntax for defining extension methods and properties using an extension<T> declaration instead of the classic this modifier. The C# compiler implements these as static methods and compiler-generated metadata types, which presents challenges for PostSharp:

  1. Multicasting: Previous versions of PostSharp would multicast aspects to all compiler-generated implementation methods, including those from extension blocks. In PostSharp 2026.0, multicast attributes skip extension block members by default to prevent unexpected behavior.
  2. IAspectProvider/IAdviceProvider: These interfaces receive IL-level reflection objects (static methods and metadata types) rather than the C# source syntax. Since PostSharp relies on System.Reflection to provide access to the code model, developers using these interfaces must manually identify and filter extension block metadata.

To address these challenges, PostSharp 2026.0 introduces:

For detailed information, examples, and best practices, see C# 14 extension blocks and multicasting.

Deprecation of unsupported target frameworks

We removed support for all pre-2017 target frameworks, as well as the versions of .NET Core that fell out of mainstream support. The new baseline frameworks are now .NET Standard 2.0, .NET Framework 4.7.0, and .NET 6.0.

Refer to Breaking Changes in PostSharp 2026.0 for more detailed information.