What’s New in ASP.NET Core in .NET 7?

Overview On .NET Core – TA Digital LabsASP.NET Core is a modern Web framework for .NET and includes everything you need to build beautiful Web UIs and powerful back-end services. Unlike other development platforms that require you to piece together a Web application from multiple frameworks, ASP.NET Core offers a complete and cohesive Web development solution. With ASP.NET Core, you can build dynamic server-rendered UIs using MVC or Razor Pages. You can integrate ASP.NET Core with popular JavaScript frameworks or you can build rich interactive client Web UIs completely in .NET using Blazor. For services, you can use ASP.NET Core to build standards-based HTTP APIs, real-time services with SignalR, or high-performance back-end services with gRPC.

Under the hood, ASP.NET Core provides a flexible hosting model, high-performance servers, and a rich set of built-in middleware to handle cross-cutting concerns like localization and security. No matter what kind of Web, server, or cloud app you’re trying to build, ASP.NET Core offers a complete and fully integrated solution.

The final version of ASP.NET Core 7 is planned for release in November this year.

Microsoft does not stop! For months now we have seen updates and news from the .NET development team and they have just released the third preview of .NET 7. This final version is planned for release in November this year, but until then let’s talk about the new features and performance improvements it will bring!

Announcing ASP.NET Core 7 with New Updates

New OFFICIAL .NET 7 Features Released (Now FASTER and LIGHTER⚡)As a mini introduction, .NET is Microsoft’s platform for building and developing different types of applications. One of the main features of this platform is that it is cross-platform, open source and free.

With the .NET platform you can build from desktop applications (for different operating systems such as Windows, macOS or Linux), mobile applications (Android or iOs) to web apps, IoT software or even games (with the Unity engine based on C#).

Regarding .NET 7 (also called dotnet 7), it is the next version that Microsoft is re-releasing by the end of 2022. The current official stable version is .NET 6.

.Net 7 has the same foundation as .Net 6, which includes simplified development experience, more productivity & a unified block of libraries & platform. Aside that, there are three major topics that we’ll see improvements in .Net 7.

  • Modern Client Development: .Net MAUI
  • Cloud Native & Containers
  • Upgrading existing .Net Apps
  • JWT Authentication Improvements & Automatic Configuration

.NET 7 is Coming with C# 11. Before we jump into the details for .Net 7, Let’s quickly look at the .Net release cycle & support policy.

.Net Release Cycle & Support Policy

Starting with .Net 5, Microsoft committed to a yearly release of a new .Net version. The release will usually be on November each year.

There’s a difference between Even .Net version numbers & Odd version numbers. .Net 6 & .Net 8 are long-term supported versions. These versions will get patches for 3 years. Whereas .Net 7 is a short term release that will get patches for 18 months, which means after the .Net 8 comes out, you will have around 6 months to upgrade from .Net 7 to .Net 8.

Modern Client Development: .Net MAUI

.Net MAUI is the new cross-platform native UI development toolkit for the .Net & will be part of .Net 7. MAUI preview 13 has been released with improved tooling & performance.

Cloud Native & Containers

Microsoft wants to focus on the developers journey for cloud native applications. Specifically they want to improve 2 points with .Net 7:

  • Simplifying the setup & configuration necessary to implement secure authentication and authorization.
  • Improving the performance of application startup & runtime execution.

If we talk about improvements, Microsoft announced that they’ll continue to invest in orleans, which is a .Net cross-platform framework for building distributed applications.

They also plan to simplify & improve the developer experience for containerized .Net applications.

Upgrading existing .Net Apps

Microsoft want to help developers with upgrading existing .Net applications to .Net 7 & they plan to improve the Update Assistant to support additional use cases.

In short, it should become even simpler to upgrade existing .Net application with .Net 7.

JWT Authentication Improvements & Automatic Configuration

This is one of the Best Improvement Microsoft Announced in .Net 7 Preview 5 with some great improvements.

Some more improvements & features

A lot is going on Asp.Net Core development. I mentioned 4 improvements above that I believe are the most important. There are some more to mention.

Performance Improvements

Additional performance improvements with .Net 7 to make it faster & more efficient. .Net 6 already had a massive impact on performance & .Net 7 will take this even further. Even if you don’t run into performance issues today, it will save your money without altering your source code when running on the cloud.

Official HTTP 3 Support

Http 3 was shipped as a preview feature in .Net 6 & will be a part of .Net 7 & enabled by default. In future .Net 7 preview versions, we’ll see performance improvements & additional tls features.

Minimal APIs Improvements

Minimal APIs were introduced in .Net 6 & allows you to create lightweight APIs without the overhead of controllers.

With .Net 7, we will see additional improvements & support for currently missing features like grouping endpoints with a common route prefix. Endpoint filters will allow you to implement crosscutting concerns that you can only do with controllers using action filters today.

Blazor Hybrid Support

Blazor Hybrid Support will allow us to take existing blazor components & put them together into a desktop application using a webview control with access to all underlying hardware APIs. It will allow developers to use web technologies to build desktop applications with access to system resources such as the local file system or a webcam.

Finale

There’s so much going on just a few months after .Net 6 shipped we already see a clear picture of what will be coming before the end of 2022 with .Net 7. So, this is the best time to shift on .Net 7. There are things that I haven’t covered in this short overview of .Net 7 important features. However you can read the .Net 7 preview 1 announce post. You’ll find additional information about ML.Net, WinForms, WPF, Nuget & Roslyn Improvements.

Agnes Berry