Announcing ASP.NET Core in .NET 5

Daniel Roth

.NET 5 is now released! .NET 5 is the next version of .NET Core and the future of the .NET platform. With .NET 5 you have everything you need to build rich, interactive front end web UI and powerful backend services.

ASP.NET Core in .NET 5 is loaded with lots of great new features and improvements. Here’s a sampling:

For a full list of everything that’s new in ASP.NET Core in this release, check out the ASP.NET Core in .NET 5 release notes. See also the .NET 5 release notes for additional details and known issues.

Get started

To get started with ASP.NET Core in .NET 5, install the .NET 5 SDK. .NET 5 is also included with the latest updates to Visual Studio and Visual Studio for Mac, so if you’ve already updated your IDE, then you should be good to go.

Visual Studio 2019 16.8 or later is required to use .NET 5 from Visual Studio. .NET 5 is also supported with Visual Studio for Mac. To use .NET 5 with Visual Studio Code, install the latest version of the C# extension.

Upgrade an existing project

To upgrade an existing ASP.NET Core app from .NET Core 3.1 to .NET 5:

To upgrade an existing ASP.NET Core app from .NET 5 RC2 to .NET 5:

  • Update all Microsoft.AspNetCore.*, Microsoft.Extensions.*, and System.* package references to 5.0.0.

That’s it! You should be all set to enjoy the benefits of .NET 5.

See also the full list of breaking changes in ASP.NET Core for .NET 5.

Performance improvements

With every .NET release a special effort is made to improve all aspects of the performance in ASP.NET Core applications. ASP.NET Core in .NET 5 is the fastest .NET web framework we’ve ever shipped!

.NET 5 contains great performance improvements in the runtime and libraries and for the gRPC components. These improvements, when applied to ASP.NET Core, result in some significant wins in throughput (RPS) and latency. The performance results below are taken from the TechEmpower benchmarks for ASP.NET Core with .NET Core 3.1 and from the latest results for ASP.NET Core with .NET 5.

Troughput (max, in RPS)

Scenario 3.1 5.0 Change
Plaintext Platform 8,593 11,690 +36.0%
Json Platform 872 1,261 +44.6%
Fortunes Platform 344 423 +23.0%
Plaintext 3,993 4,420 +12.4%
Json 743 912 +22.6%
Fortunes 223 259 +16.2%

Latency (mean, in ms)

Scenario 3.1 5.0 Change
Plaintext Platform 1.52 0.82 -46.3%
Json Platform 1.24 0.41 -66.7%
Fortunes Platform 1.57 1.26 -19.7
Plaintext 0.87 0.83 -4.2%
Json 1.52 1.20 -21.1%
Fortunes 1.11 0.87 -21.6

The “platform” tests represent highly optimized benchmark implementations, while the non-platform tests use more typical framework components.

The TechEmpower performance composite score, an index based on all of the TechEmpower benchmarks aggregated together, increased from 5,659 to 6,626 with .NET 5, which represents a 17% increase.

Deploy .NET 5 Web Apps to Azure App Service Today

The ASP.NET and Azure App Service teams have worked tirelessly together throughout the .NET 5 timeline to make sure ASP.NET developers have access to the latest bits of the .NET 5 runtime on day zero. This means that, as soon as you can download .NET 5 and get started building apps with it, you can deploy those .NET 5 apps to App Service using Visual Studio and Visual Studio Code, and you’ll have full support for deploying .NET 5 apps to App Service using GitHub Actions.

This day-zero availability of .NET 5 on App Service will be made possible by their new Early Access Runtime feature, which will enable not only .NET 5 apps, but every subsequent release of .NET from now on. This means no more waiting for the platform to support the runtime – it’ll “just be there” as soon as the runtime is available. You can learn more about the Azure App Service Early Access Runtime technology on the App Service team’s blog.

Whilst Early Access will give you a supported path to deploying your .NET 5 apps to Azure App Service immediately, there are some slight nuances to how Early Access works with which you can familiarize yourself on the App Service Early Access .NET page. Specifically, you will need to create the App Service in the Azure Portal, and select .NET as the stack (rather than .NET Core), then select .NET 5 as the .NET Framework Version as shown below.

Azure App Service settings for .NET 5

Join us for the .NET 5 release at .NET Conf 2020

Come celebrate with us and learn all about the .NET 5 release at .NET Conf 2020, a FREE, three day virtual developer event co-organized by the .NET community and Microsoft. This year marks the 10th anniversary of the conference, and it will be better than ever with over 80 live sessions from speakers in the community and from the Microsoft product teams. The conference starts today and goes from November 10-12. We hope you can join us!

Thank you!

Thank you to everyone in the community who helped make this release of .NET 5 possible! This release represents the culmination of many GitHub issues, pull requests, design feedback comments and documentation updates contributed by many members of the .NET community. We couldn’t have made it to this point without you!

We hope you enjoy this release of ASP.NET Core in .NET 5. We are eager to hear about your experiences with this latest release. Let us know what you think on GitHub by filing new issues and by commenting on or expressing your support (👍) for existing ones.

Thanks again for trying out ASP.NET Core!

52 comments

Discussion is closed. Login to edit/delete existing comments.

  • Marcos Musa 0

    Great news! Congrats!

  • Igor Nesterov 0

    Hi! After updating 3.1 to 5.0 Blazor WebAssembly does not work. Build fails with error:
    “here was no runtime pack for microsoft.aspnetcore.app available for the specified runtimeidentifier ‘browser-wasm”

    https://stackoverflow.com/questions/63993294/there-was-no-runtime-pack-for-microsoft-aspnetcore-app-available-for-the-specifi/64023951

    p.s. Daniel I fount tip about adding RuntimeIdentifier into project in article for Preview 7
    https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-5-preview-7/
    But it does not exist in final document but still needs to be done

      • Igor Nesterov 0

        Yeah! I can confirm, did everything and double checked.
        And one more question about Microsoft.AspNetCore.Identity 2.2.0 package. This is the only one package which does not have updated version, is it ok, to continue to use it? It has a target only for .Net Standard 2.0 which is not compatible with .Net 5.0, but everything compiles except error above

        • Daniel RothMicrosoft employee 0

          OK, go ahead and open a GitHub issue then with the contents of your Blazor WebAssembly project file and we’ll take a look.

          Microsoft.AspNetCore.Identity was included in the ASP.NET Core shared framework for .NET Core 3.0, so you shouldn’t need to reference that package from an ASP.NET Core app in .NET Core 3.0 or later.

          • Igor Nesterov 0

            Big thanks Daniel! I will try again, maybe problem was in this package

  • Karimulla Shaik 0

    Is there any way including windows work flow foundation in newer versions

  • Everson Abreu 0

    Hello, I’m using a Blazor WebAssembly project in Visual Studio Community 2019 Version 16.8.1, and when starting the application in debug mode, sometimes the following exception happens: “Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.ProtocolException”. The browser I’m using is Chrome. The browser I’m using is Chrome. As do to solve this? Do you have a solution yet?

    • Daniel RothMicrosoft employee 0

      Hi Everson. To help us figure out what’s going on, we’ll need you to sure with us your %TEMP%\visualstudio-js-debugger.txt log. Probably best to do that in a VS feedback issue.

    • Daniel RothMicrosoft employee 0

      Thanks for the suggestion!

  • Somnath Shukla 0

    does .Net 5 has fix for this. Its show stopper for .Net 3.1 . i can not use WindowsIdentity.RunImpersonated from IIS.
    https://github.com/dotnet/runtime/issues/29935

    or is there any recommendation for file sharing between two IIS sever(web Farm scenario)

    • Daniel RothMicrosoft employee 0

      Hi Somnath. It looks like the issue is still open. Probably best to follow up with folks on the GitHub issue.

  • zephania Eliah 0

    Hellow Daniel Congratulation for the great effort your team have put int .NET ecosystem
    I was to upgrade our projects from net core 3.1 without any headache and improved our apps performance.

  • nanson 0

    Hi Daniel,
    Been on Blazor since mid May and built a nice 3.1 prototype that will replace a Silverlight application, then was commissioned to build a new billing action workflow application that just went live in November. Now I’m back on the original project that started it all. I’ve updated to packages 5.0.0-rc.2.20475, but there seems to be a problem with my MainLayout page – on launch, the Sidebar (NavMenu) is present, but the MainLayout header is now on the bottom, and floating. I’ve determined that this is directly tied to the changes (below), as advised in this thread: https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-5.0&tabs=visual-studio#update-blazor-webassembly-projects

    Can you assist?
    Thank you.

    
    -Loading...
    +Loading...
    
    -builder.RootComponents.Add("app");
    +builder.RootComponents.Add("#app");
    
    -builder.Services.AddTransient(sp => new HttpClient 
    -    { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
    +builder.Services.AddScoped(sp => new HttpClient 
    +    { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
    • anonymous 0

      this comment has been deleted.

    • Daniel RothMicrosoft employee 0

      Hello. It sounds like you’re just missing some CSS changes to account for the move from <app>Loading...</app> to <div id="app">Loading...</div>.

      • nanson 0

        Can you please elaborate? I did change the index file to use div, and I changed the reference to the element (in client project program.cs) to a CSS selector by adding a hash # to it. Is there more?
        Thank you

        builder.RootComponents.Add("#app");
        • Daniel RothMicrosoft employee 0

          Yeah, the CSS selectors based on the old app tag need to be updated to no longer rely on that tag, since it isn’t used any more.

          • nanson 0

            I’m sorry Daniel, but I’m not understanding your response.
            I now have this, with the issue still standing.

            index.html
            <div id="app">Loading... etc. div end tag
            
            program.cs Main
            builder.RootComponents.Add("#app")
          • Daniel RothMicrosoft employee 0

            Sorry for being unclear! I was talking about the CSS selectors in app.css. Previously, the default Blazor template included CSS with selectors like this:

            app {
                position: relative;
                display: flex;
                flex-direction: column;
            }

            Obviously this will no longer work if you no longer have an <app> tag.

    • Immo LandwerthMicrosoft employee 0

      Presumably you’re referring to this post. The claim of the improvement was with our previous implementation. We’re looking at more ways to optimize Regex.

      Do you have a particular usage scenario that you’d like to share with us? Comparing benchmarks isn’t always the best way to drive performance improvements, because the scenario that they measure might not be a scenario that is relevant to you. Also, there might be improvements we could prioritize that would help your scenarios more than this particular benchmark.

  • Luis Chang 0

    The performance improvements are very good! Thanks.

Feedback usabilla icon