In the ever evolving world of .NET, the next major release or Long Term Supported (LTS) release had its first preview release today. LTS means it’ll be supported for 3 years instead of .NET 7’s 18 months. The changes in .NET 8 include producing Release assets by default when you call dotnet publish or dotnet pack. This can of course be reverted by changing the PublishRelease property to false. Various improvements have been made to System.Text.Json serialization including the JsonNamingPolicy allowing for naming policies like snake_case and kebab-case. Their name matches their definition. I like that little bit of detail.

Randomness

There are two new methods for working with randomness: GetITems<T>() and Shuffle<T>() The latter will make job interviews a lot easier when you have to shuffle a deck of cards and the former will make it easier to, as the documentation describes, make a game of “Simon” where players must remember a sequence of colored buttons. Again this will be handy in job interviews.

Performance

What would a release of .NET be without some amazing performance enhancements? This release brings with it improvements to the native ahead-of-time (native AOT) compilation. The AOT apps are now up to 50% smaller than they were on .NET 7! Really cool.

To keep up with all the changes in .NET 8 throughout the previews and release candidates keep the What’s new in .NET8 site open in a browser tab.