Introducing .NET 5 Preview 1

Late last year, we released .NET Core 3.0 and 3.1. In these versions, Windows Forms (WinForms) and WPF, ASP.NET Blazor desktop application models for creating single-page applications and gRPC for contract-based cross-platform messaging have been added. We also added templates for creating services, cool generation of client code for communicating with gRPC, REST API services and much more. We are pleased that .NET Core 3 has become the fastest-accepted version of .NET, and over the last year we have another million users.

We also worked on these releases to complete the migration of application models from the .NET Framework. In .NET Core 3, we migrated all the most used application models and introduced new cross-platform infrastructures instead of those that were not ported.

In anticipation of the next major release of .NET 5, we will continue to integrate .NET into a single platform by including our .NET mobile application model (Xamarin) in .NET 5. .NET 5 will include ASP.NET Core, Entity Framework Core, WinForms, WPF, Xamarin and ML.NET. For the first time, the entire platform will use a unified BCL (base class library) for all application models. The presence of version 5, which is higher than that of the .NET Core and .NET Framework, also makes it clear that .NET 5 is the future of .NET, a single unified platform for creating any type of application.

We have said this many times, but we will repeat it again; .NET Core, and then .NET 5, is .NET, with which you should create all your new applications. The .NET Framework will be supported as long as Windows itself is supported. We will continue to provide security and fix bugs, as well as update the network and crypto APIs. It will remain secure and supported to run your older applications on the .NET Framework.



Install .NET 5.0 Preview 1


Today we are releasing the first Preview .NET 5, the full release of which is scheduled for the end of this year in November.


Read ASP.NET Core updates in .NET 5 Preview 1 to learn about today's release of ASP.NET Core.

Preview 1 includes support for Windows ARM64 for the first time. Today's version also includes runtime .NET Core. We expect the SDK (ASP.NET core, but not WPF or Windows Forms) to be added in Preview 2. Later previews will include WPF and Windows Forms. Support for Windows ARM64 will also be ported to .NET Core 3.1. We will share more details about this in a post about Preview 2.

Updating existing projects


You can upgrade existing projects by updating the target platform as follows:

<TargetFramework>netcoreapp5.0</TargetFramework>

Top Targets .NET 5


  • Unified .NET SDK Experience:
    • BCL ( ) .NET 5. Xamarin Mono BCL, .NET Core BCL, .
    • (Xamarin) .NET 5. , .NET SDK mobile. , «dotnet new XamarinForms» .
  • , : « », , , Window Desktop, Microsoft Duo (Android) iOS, , .
  • Web applications that support multiple platforms: one Blazor project that supports an application that can run in browsers, on mobile devices and as a native desktop application (for example, Windows 10x).
  • Native cloud applications: high-performance microservices with a single file (.exe) <50 MB and support for the creation of several projects (APIs, web interfaces, containers) both locally and in the cloud.
  • Continuous improvements, such as: acceleration of algorithms in BCL, improvements to container support at runtime, support for HTTP3.

Preview 1 does not yet contain the results of all these goals, but we will continue to announce more features in future previews.

Improvements in Preview 1


The following improvements in Preview 1:

Regular Expression Performance Improvements


We have invested heavily in the Regex engine. In many of the expressions we tested, these improvements usually lead to 3-6 times higher productivity, and in some cases, much more. Soon we will have a blog post in which these improvements will be described in more detail.

Improving code quality in RyuJIT


Each release includes a set of performance improvements for the code that JIT generates. We call this type of enhancement “CQ” or code quality. In most cases, these improvements also apply to code created for ready-to-run images.


event pipe


We have added information about loading the assembly in the event pipe. This improvement is the beginning of the availability of similar diagnostic features that are part of the .NET Framework with the  Fusion Log Viewer . Now you can use  dotnet-trace  to collect this information using the following command:

dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:4:4 --process-id [process ID]

The workflow is described in the Trace Assembly Loading with Event Pipe section . You can see assembly loading information for a simple test application.



Event Profiling API (Event Pipe)


Event Pipe is a new subsystem and API that we added to .NET Core 2.2 to make it possible to run performance diagnostics and others in any operating system. In .NET 5.0, the Event Pipe has been expanded so that profilers can record Event Pipe events. This scenario is important for profiler tools that previously used ETW to monitor application behavior and performance.

GitHub Repository Consolidation


As part of the .NET 5 release, we have  reduced the number of repositories on GitHub that were used to create and package .NET. Repository boundaries have a significant impact on many aspects of a project, including assembly and problem management. With .NET Core 1.0, we had over 100 repositories in ASP.NET, EF, and .NET Core. Now everything has changed. We also migrated almost all repositories to dotnet org.

Check out the new, consolidated repositories:


All Articles