docs/en/Community-Articles/2024-10-23-Abp-Net9-Upgrade/post.md
.NET 9.0.100-rc.2 has been released on October 8, 2024. To align with the latest .NET, we also released the ABP Platform 9.0.0-rc.1 version. With this release, ABP now supports .NET 9.
The .NET 9 stable version is planned to be released on November 12, 2024 before the .NET Conf 2024 event. The ABP 9.0 stable version is planned to be released on November 19, 2024.
Download the .NET 9 runtime and SDK from the following link:
There are many enhancements and bug fixes with ABP 9.0. Read the ABP 9 announcement:
Read our migration ABP 9.0 migration guide from the following link:
The following is the PR is for the .NET 9 upgrade in the ABP source code:
In the following link, you can find a list of all .NET 9 releases with direct links to release notes and announcements/discussions:
The ABP 9.0 version fully supports .NET 9 within our new templates and modules. For developers who want to update their ABP packages to the latest but want to keep them in .NET 8, we support both .NET 8 and .NET 9 in ABP 9. In your host application, you can choose your target framework.
So you can decide which version you want to use in your startup Host Application’s <TargetFramework> tag.
In this link you can see that netstandard2.0/2.1 and net8/9 are supported.
<Project Sdk="Microsoft.NET.Sdk">
<TargetFrameworks>
netstandard2.0;netstandard2.1;net8.0;net9.0
</TargetFrameworks>
</Project>
MapStaticAssets is a new middleware that helps optimize the delivery of static assets in any ASP.NET Core app, including Blazor apps. With this change, some JavaScript/CSS/Images files exist in the Virtual File System, but the new ASP.NET Core 9 MapStaticAssets can't handle them. You need to add StaticFileMiddleware to serve these files. In ABP 9, we added MapAbpStaticAssetsan extension method to support the new MapStaticAssets. You can read about this new feature at this link.
ABP’s new extension method is available here.
Install the latest .NET 9 SDK from this link. Upgrade dotnet-ef tool version with the following command:
dotnet tool uninstall --global dotnet-ef && dotnet tool install --global dotnet-ef
TargetFramework tags from net8.0 to net9.0.9.0.0.global.json, update dotnetversion to 9.0.0 .app.UseStaticFiles() to app.MapAbpStaticAssets() in your module classes and startup projects.
See the related changes in the repository..NET 9 Blazor New Features
.NET 9 Performance Improvements Summary
What’s new in .NET 9 (Microsoft’s post)
Before we release any version of ABP, we test our upcoming version on our sample apps and live website https://abp.io. The ABP.io website is also built on top of the ABP Framework, and you can see that we have already started to use .NET 9-rc.2 on our live website.
Lastly, I want to mention Microsoft's .NET support policy.
Find detailed information about the .NET support policy at this link.
.NET 9 is making a significant impact. It introduces features like Native AOT for faster applications, enhanced AI integration and improved tools for cloud-native and cross-platform development, all aimed at simplifying developers’ work. Whether you’re handling small projects or large-scale enterprise applications, it offers enhancements that elevate your productivity by just upgrading your .NET version to 9.0