Friday, October 27, 2023

Shiny new .NET 8 features

.NET 8 is the latest version (at the time of writing) of the popular cross-platform framework for building web, desktop, mobile, and IoT applications. It comes with many new features and improvements that make development easier, faster, and more enjoyable. Here are some of the highlights:

  • Source generators: These are a new kind of compiler plugin that can generate code at compile time based on your project's source code. They can be used for various purposes, such as generating serialization code, logging code, or boilerplate code. Source generators can improve performance, reduce dependencies, and simplify maintenance.
  • Minimal APIs: These are a new way of creating web APIs in ASP.NET Core with minimal code and configuration. You can use simple lambda expressions to define your endpoints, parameters, and responses. Minimal APIs are ideal for building microservices, prototypes, or simple CRUD APIs.
  • C# 10: The latest version of the C# language brings many new features and enhancements, such as record structs, global using directives, file-scoped namespaces, constant interpolated strings, and improved pattern matching. C# 10 also supports nullable reference types by default, which can help you avoid null-related bugs.
  • Blazor Desktop: This is a new way of building desktop applications with Blazor, the framework that lets you use C# and HTML to create interactive web UIs. Blazor Desktop allows you to host a Blazor web app inside a native desktop window using WebView2 or Electron. You can access native features such as menus, dialogs, and notifications through interop services.
  • Hot reload: This is a new feature that enables you to make changes to your code while your app is running, without losing the app state. You can use hot reload for any kind of .NET app, whether it's a web app, a desktop app, or a mobile app. Hot reload can boost your productivity and shorten your feedback loop.

These are just some of the shiny new .NET 8 features that you can try out today. To learn more about .NET 8 and how to get started, visit

No comments: