Backend Development 4 min read

.NET 8 Preview 5 Released: New SDK Features, Alpine ASP.NET Docker Image, and Performance Enhancements

The .NET 8 Preview 5 release introduces a DI‑friendly metrics API, built‑in Source Link, a new library analyzer, Linux self‑contained build changes, a composite R2R Docker image, removal of the RID graph, default PGO, and NativeAOT field‑access optimizations, all aimed at improving developer experience and runtime performance.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
.NET 8 Preview 5 Released: New SDK Features, Alpine ASP.NET Docker Image, and Performance Enhancements

.NET 8 Preview 5 has been released.

SDK Changes

DI‑friendly metrics API : introduces the IMeterFactory interface that can be registered in the DI container to isolate Meter creation.

Source Link as part of the .NET SDK : the SDK now includes source‑link support, improving the IDE experience when inspecting Sourcelinked NuGet packages.

New .NET library analyzer : an analyzer built into the SDK and IDE that detects issues while coding and offers corrective suggestions.

Linux self‑contained : Linux distribution builds (from source) can produce self‑contained applications that bundle a runtime built from source.

Self‑contained no longer default : the -r/--runtime option no longer forces --self-contained for apps targeting net8.0 and higher.

Alpine ASP.NET Docker Image

A new ASP.NET Docker image uses a "composite" Ready‑to‑Run (R2R) compilation variant that merges multiple MSIL assemblies into a single R2R binary, reducing JIT time, improving startup performance, and shrinking image size.

RID‑specific assets no longer need a RID graph

When running with runtime‑specific (RID) assets, the host determines which assets match the platform. The RID graph has proven costly to maintain, so .NET 8 defaults to not using a RID graph and instead relies on a known list of RIDs derived from the runtime build.

Codegen Optimizations

Dynamic Profile‑Guided Optimization (PGO) is now enabled by default, eliminating the need for special configuration. Expected performance gains range from 5% to 500% (reasonable expectation around 15%), depending on the application's bottlenecks.

To opt out of dynamic PGO, set the following in your project file:

<TieredPGO>false</TieredPGO>

NativeAOT ThreadStatic Field Access Improvements

Fields marked with ThreadStaticLocal now have optimized access for primitive types, and reference‑type fields have also been optimized, delivering noticeable improvements in many benchmarks.

backendperformanceSDKDockerRuntime.NET
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.