Introducing PostSharp 2024: Now with .NET 8.0, C# 12, and ARM64 Support

by Gael Fraiteur on 02 Jan 2024

We are excited to announce the release of PostSharp 2024.0, adding support for .NET 8, C# 12, and ARM64. This release is one of our most significant since we began the Metalama project.

Note that we are simultaneously releasing Metalama 2024.0.

This release reaffirms our commitment to PostSharp. Although new feature development has ceased, we ensure our loyal users can update their development environments without being hindered by PostSharp.

See the release notes for a complete overview of this release, including the inevitable breaking changes.

Platform Update

We’re happy to announce that PostSharp now fully supports .NET 8.0 and C# 12. This means you can confidently use PostSharp with the fresh .NET stack that Microsoft released last November.

This opportunity also allowed us to conduct a thorough cleanup and update our dependencies, bringing about the most significant changes in PostSharp in recent years.

  • To build any project targeting .NET Standard, .NET Core, or .NET 5 or later, the .NET 6.0 SDK is now required. Older .NET Core SDKs are no longer supported.
  • The use of BinaryFormatter for aspect serialization - employed when aspects are marked with [Serializable] - is now deprecated. Although its use is harmless when used to serialize aspects, Microsoft now reports it as a security vulnerability. We recommend using [PSerializable] for your aspects. If this isn’t possible, set the PostSharpBinaryFormatterAllowed MSBuild property to True.
  • Similarly, the default serializer in PostSharp.Patterns.Caching is now JsonCachingSerializer, replacing the deprecated BinarySerializer.
  • We’ve updated all dependencies for which vulnerabilities were reported.

ARM64 Support

The most significant addition in PostSharp 2024.0 is the full support for ARM64 hardware across all supported operating systems: Windows ARM64, Linux ARM64, and MacOS. PostSharp now runs natively on this hardware, eliminating the need for slow and cumbersome emulation. You can build projects targeting all supported platforms: .NET Framework, .NET Standard, .NET Core, and .NET 5+.

PostSharp Tools for Visual Studio is now fully compatible with Visual Studio running on Windows ARM64.

Thanks to cross-compilation and AMD64 emulation, Windows ARM64 is now the most versatile development platform, especially when running on a Mac in a virtual machine. It was therefore critical for PostSharp to be compatible with this platform.

Roadmap

We’re currently focusing on PostSharp 2024.1 and Metalama 2024.1, with plans to merge the Visual Studio extensions of both products into a single package. This initiative will bring some features of the PostSharp extension to Metalama users, without causing duplication in the user interface.

Conclusion

With the integration of full ARM64 support, this release represents the largest stride we’ve made since we started working on Metalama in 2020. Enjoy your fresh development environment and maintainable source code thank to PostSharp 2024.0.

Happy meta-programming in 2024!

P.S. We are partnering with SlashData. Please participate in the Developer Nation Survey if you haven’t done it.