I’ve been getting up close and personal with .Net 9 preview in the last couple of weeks. Preview 7 was launched on 13th August 2024, so I thought I’d ping out a quick & easy summary of what’s in it…
(Useful links at the bottom of the page)
Support for UUID version 7
New Guid.CreateVersion7() method which returns V7 compliant UUIDs. The point being that these are ordered and therefore better suited for use a database keys (better B-Tree node balancing). Simple, but really useful & my personal favourite for this release.
Removal of BinaryFormatter is complete
This was announced a while ago. You can find the migration guide here.
Enumerate over ReadOnlySpan<char>.Split() segments
Enables elegantly enumerating over the segments produced by Split(..), treating them as spans to improve memory allocation and performance.
Compression APIs now use zlib-ng
Compression features in the System.IO.Compression namespace move from using zlib to zlib-ng for better consistency & efficiency on different OS & hardware implementations.
Debug.Assert(…) now reports assert condition
When Debug.Assert(…) fails, it now reports details of the failing assert condition.
Changes to X.509 Certificate Loading
A new X509CertificateLoader class that replaces the other 5 or 6 patterns for loading X.509 certificates that have previously existed. Currently only supports Cert & Pkcs12 formats, with support for other formats planned for future releases.
Interlocked methods support more types
Interlocked.CompareExchange(…) and Interlocked.Exchange(…) now support byte, sbyte, short, bool and char natively.
AES-GCM and ChaChaPoly1305 algorithms enabled for iOS/tvOS/MacCatalyst
Does what it says on the tin.
OpenSSL providers support
Builds on the OpenSSL support introduced in .Net 8 and adds support for providers such as tmp2 and pkcs11. Brings some potential performance improvements during TLS handshakes.
Support for XPS documents from XPS virtual printer
XPS documents from a V4 XPS virtual printer can now be opened from the System.IO.Packaging library.
Marking Tensor<T> as [Experimental]
Tensor<T> is marked as experimental for .Net 9 with full support planned for .Net 10.
Useful Links
Visual Studio 17.12 preview, which supports the latest .Net 9 preview, was released on 13th August 2024. You can download it here.
The download for the latest .Net 9 SDK is here and the full Microsoft documentation is here.