.NET 11 Preview 5: Brings File-Based App Improvements, New C# Features, and a Blazor Validation Wave
Summary
Microsoft released .NET 11 Preview 5 on June 19, 2026, delivering updates across its runtime, SDK, libraries, ASP.NET Core, .NET MAUI, C#, and Entity Framework Core. The .NET SDK now supports file-based app code splitting via the new "#:ref" directive and includes the Model Context Protocol server template. C# introduces closed classes for exhaustive switch expressions, union declarations with pattern matching, and advances Unsafe Evolution for pointer types. ASP.NET Core enhances Blazor with instant client-side validation for server-side rendered forms, async validation, and localization. QuickGrid sorting and pagination now function on static pages, and Blazor WebAssembly apps gain a new Gateway development server. .NET MAUI received a reliability rollup, CancellationToken-aware animation overloads, and control updates, including Azure Maps backing for the Windows Map control. Entity Framework Core adds "dotnet ef tool" support for file-based apps, introduces EF1004 warnings for synchronous async queries, and defaults to SQL Server 2022 compatibility.
Key takeaway
For .NET developers building file-based applications or modern web and mobile UIs, .NET 11 Preview 5 offers crucial enhancements. You should explore the new "#:ref" directive for modular code organization and utilize Blazor's instant client-side validation to improve user experience. Consider adopting C#'s closed classes for more robust type-safe code. These updates streamline development workflows and enhance application performance and reliability.
Key insights
.NET 11 Preview 5 significantly advances developer tooling, language features, and web/mobile UI frameworks.
Principles
- Enhance file-based app development.
- Improve C# type safety and expressiveness.
- Streamline Blazor client-side interactions.
Method
The SDK integrates new templates and directives, while frameworks like Blazor and EF Core receive specific feature additions and performance enhancements.
In practice
- Use "#:ref" for modular file-based apps.
- Implement closed classes for exhaustive switches.
- Utilize Blazor client-side validation.
Topics
- .NET 11 Preview 5
- C# Language Features
- Blazor Web Development
- .NET MAUI
- Entity Framework Core
- File-Based Applications
Code references
Best for: Software Engineer, Tech Journalist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by InfoQ.