.NET 11 Preview 3 includes new runtime features and performance work:
- Runtime async removes the preview-API opt-in requirement
- JIT optimizations improve switches, bounds checks, and casts
- Browser and WebAssembly add WebCIL and debugging improvements
- Breaking changes
- Bug fixes
- Community contributors
.NET Runtime updates in .NET 11:
Runtime async still uses the runtime-async=on feature switch, but Preview 3
removes the [RequiresPreviewFeatures] gate from its APIs. A net11.0
project no longer needs <EnablePreviewFeatures>true</EnablePreviewFeatures>
just to enable runtime-async=on
(dotnet/runtime #124488).
Support for NativeAOT and ReadyToRun also landed in this preview (dotnet/runtime #123952, dotnet/runtime #124203, dotnet/runtime #125420). Follow-on work reuses continuation objects more aggressively and avoids saving unchanged locals, which reduces allocation pressure in async-heavy code (dotnet/runtime #125556, dotnet/runtime #125615).
<PropertyGroup>
<Features>runtime-async=on</Features>
- <EnablePreviewFeatures>true</EnablePreviewFeatures>
</PropertyGroup>Preview 3 continues the steady JIT work that benefits normal code without any
source changes. Common patterns like multi-target switch expressions now fold
into simpler branchless checks
(dotnet/runtime #124567),
index-from-end access can drop more redundant bounds checks
(dotnet/runtime #124571), and
uint to float / double casts are faster on pre-AVX-512 x86 hardware
(dotnet/runtime #124114).
Supporting compiler work lets the JIT apply these reductions across more real-world code.
bool isSmall = x is 0 or 1 or 2 or 3 or 4;
int tail = values[^1] + values[^2];
double d = someUint;Preview 3 expands the browser/CoreCLR work with WebCIL payload loading
(dotnet/runtime #124758,
dotnet/runtime #124904), better
symbols and stack traces for debugging
(dotnet/runtime #124500,
dotnet/runtime #124483), and
marshal float[], Span<float>, and ArraySegment<float> more directly across
JS boundaries
(dotnet/runtime #123642).
- NativeAOT native-library outputs now use the conventional
libprefix on Unix. If your scripts expectedMyLib.so, update them to look forlibMyLib.so(dotnet/runtime #124611).
- JIT
- Fixed correctness issues around async save/restore, if-conversion, and return-block cloning (dotnet/runtime #125044, dotnet/runtime #125072, dotnet/runtime #124642).
- VM / runtime async
- Fixed a race leak in runtime-async resumption stubs and a lock-level issue that could deadlock under contention (dotnet/runtime #125407, dotnet/runtime #125675).
Thank you contributors! ❤️