Post Image

.NET 9 introduces a range of exciting updates for ASP.NET Core and Blazor development, making it easier and more efficient to build modern web applications. From offering flexible rendering options for Blazor Web Apps to optimizing static web assets and enhancing the developer experience, .NET 9 aims to streamline both development and performance. Whether you're working on a client-side Blazor WebAssembly app or integrating robust authentication, these new features provide powerful tools to improve your workflow. Let's take a closer look at what's new in .NET 9.

General Enhancements

  • Static Web Asset Optimization: .NET 9 improves how static assets like JavaScript, CSS, and images are handled. This includes pre-compressing them to help pages load faster and improve caching.
  • Improved Developer Experience: While full details are still being released, .NET 9 promises general improvements for developers, possibly including better hot reload features.
  • Built-in Open API Support: .NET 9 makes it easier to generate Open API descriptions for your web API, simplifying API documentation creation.
  • HybridCache: This new feature helps with distributed caching by providing a unified API to manage cache data across different providers.

Blazor Web Apps

  • Flexibility in Rendering: You can now choose how to render your Blazor web app. You can go for a fully interactive client-side app (Blazor WebAssembly) or use static pages with some interactive Blazor components (Static Web Assets with Blazor).
  • Improved Project Creation: When you create a new Blazor app, .NET 9 automatically sets up the project for your chosen rendering method. It also uses a shared Razor Class Library (RCL) to manage UI components across both the server and client projects, making development smoother.
  • Simplified Authentication: It's easier to add authentication to your Blazor web app. When you create a new app with Individual Accounts and WebAssembly, .NET 9 automatically includes a custom AuthenticationStateProvider in both server and client projects.