ASP.NET Core 11 Preview 1: New Blazor Features & WebAssembly Enhancements
Microsoft has released the first preview of ASP.NET Core in .NET 11, introducing groundbreaking updates for Blazor, WebAssembly, and web development workflows. Developers can now leverage environment-specific rendering, improved form accessibility, and streamlined navigation—all designed to simplify modern app development.
New Blazor Components for Environment-Specific Rendering
The EnvironmentBoundary component allows developers to conditionally render content based on hosting environments (e.g., development, production). This eliminates manual environment checks and works seamlessly across Blazor Server and WebAssembly. For example:
- Use
Include="Development"to show debug tools only in dev environments. - Exclude staging content with
Exclude="Staging"for production deployments.
Enhanced Blazor Forms and Accessibility
ASP.NET Core 11 introduces two key components for form accessibility:
- Label component: Automatically extracts display names from metadata attributes and supports nested/non-nested label-input associations.
- DisplayName component: Mimics MVC’s
@Html.DisplayNameFor()with localization support for property names.
Navigation Improvements in Blazor
Relative URI navigation now supports nested folder structures via the RelativeToCurrentUri parameter in NavigationManager.NavigateTo() and NavLink components. Additionally, the new GetUriWithHash() method appends hash fragments to URIs without memory allocation, improving performance.
WebAssembly Enhancements
Blazor WebAssembly gains parity with Blazor Server through:
- IHostedService support for background services in the browser.
- IConfiguration access to environment variables at runtime, eliminating rebuilds for config changes.
- Component-specific metrics and tracing for performance monitoring.
Other Notable Updates
- QuickGrid now includes
OnRowClickevent handling with visual feedback. - SignalR
ConfigureConnectionfor Interactive Server components. - Unified startup options for Blazor scripts and container support in project templates.
Why This Matters
These updates address common pain points in Blazor development, such as environment management, form accessibility, and WebAssembly performance. Developers can now build more responsive, maintainable apps with fewer workarounds.
Conclusion
ASP.NET Core 11 Preview 1 marks a significant step forward for .NET developers. Whether you’re optimizing Blazor components or enhancing WebAssembly apps, these features streamline workflows and improve user experiences. Try the preview today and explore the full release notes on the official ASP.NET Core documentation.
FAQs
1. What’s new in ASP.NET Core 11 Preview 1?
Key features include the EnvironmentBoundary component, improved Blazor forms, relative URI navigation, and WebAssembly enhancements like IHostedService support.
2. How does the EnvironmentBoundary component work?
It conditionally renders content based on hosting environments (e.g., development, production) using Include and Exclude parameters.
3. Can I use WebAssembly with IHostedService now?
Yes, Blazor WebAssembly now supports background services via IHostedService, matching Blazor Server capabilities.
4. Are there performance improvements in this release?
Yes, the GetUriWithHash() method reduces memory allocations, and component-specific tracing helps optimize app performance.
5. Where can I find the full ASP.NET Core 11 Preview 1 documentation?
Visit the official GitHub repository and ASP.NET Core documentation for detailed guides.







