New things in .NET 8
Half a year to go until the release of .NET 8 — time to take a look at what we can expect.
.NET 8 is once again an LTS release; like all even version designators. This means:
- Fixes for stability
- Basically no experimental features
- Longer support period for fixes
- Usually better compatibility to packages
Accordingly, the innovations of the Runtime are kept within limits. Framework components such as EF Core or ASP.NET Core receive far more new features.
.NET Native and Native AOT is one of the most important features since .NET 7; and at the same time probably the biggest and most resource-binding feature under the hood. .NET Native makes it possible for .NET assemblies to (finally) represent truly native code — no more ILCode.
This also means that assemblies are much harder to decompile; the contents are “better” protected — in effect, as if you were programming C++. This is a feature that especially enterprise companies have been wishing for a very long time: and is now finally coming.
Since native code does not need ILCode, it also means that all the advantages of the JIT compiler to the runtime are no longer existing.
New CLI features
Since .NET 8 Preview 3 there is a new dotnet workload clean command to clean up the current workspace from leftovers.
New directory for artifacts
Until now it was completely normal for .NET developers to have bin and obj folders in every project. And just as long, developers actually want these folders to be able to be placed in a subfolder.
This is now configurable by a currently still optional property, which will group all artifacts in a .artifacts subfolder; but not only bin/obj, but also outputs of publish or package commands.
.artfiacts — Simplified output paths
Like almost all, at least almost all LTS versions there will be another update of the C# language: with .NET 8 C# 12 will arrive.
The most important updates of C# 12 are
Whether all features will really be part of the release version is not yet known. Especially with the alias types it was hoped that these are “real aliases” as known from F# (F# Type Abbreviations) — but they are only using aliases.