at the end of last year, we shipped .net core 3.0 and 3.1. these versions added the desktop app models windows forms (winforms) and wpf, asp.net blazor for building single page applications and grpc for cross-platform, contract-based messaging. we also added templates for building services, rich generation of client code for talking to grpc, rest api services, and a lot more. we’re excited to see that .net core 3 has become the fastest adopted version of .net ever and we’ve gained another million more users in just the last year.
we also communicated with these releases that this would conclude the porting of the app models from .net framework. with .net core 3, we have ported all of the most used app models as well as introduced newer cross- platform frameworks to replace the ones we did not port.
as we look forward to the next major release, .net 5, we will continue to unify .net into a single platform by including our .net mobile device app 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 libraries) for all the app models. having a version 5 that is higher than both .net core and .net framework also makes it clear that .net 5 is the future of .net, which is a single unified platform for building any type of application.
we have said this many times, but we will reiterate again; .net core and then .net 5 is the .net you should build all your new applications with. .net framework will remain supported as long as windows itself is supported. we will continue to provide security and bug fixes and keep the networking and crypto api’s up to date. it will remain safe and supported to keep your older applications on .net framework.
install .net 5.0 preview 1
today we are releasing the first preview of .net 5, which is scheduled to ga (general availability) later this year in november.
see asp.net core updates in .net 5 preview 1 to learn about today’s asp.net core release.
preview 1 includes support for windows arm64 for the first time. today’s release includes the .net core runtime. we expect preview 2 to include the sdk (asp.net core but not wpf or windows forms). a later preview will include wpf and windows forms. support for windows arm64 will also be back-ported to .net core 3.1. we will share more information on that with the preview 2 post.
updating existing projects
you can update existing projects by updating your target framework, as follows:
high-level goals for .net 5
let me highlight some of the high-level goals for .net 5:
- unified .net sdk experience:
- single bcl (base class library) across all .net 5 applications. today xamarin applications use the mono bcl but will move to use the.net core bcl, improving compatibility across our application models.
- mobile development (xamarin) is integrated into .net 5. this means the .net sdk will support mobile. for example, you can use “dotnet new xamarinforms” to create a mobile application.
- native applications supporting multiple platforms: single device project that supports an application that can work across multiple devices for example window desktop, microsoft duo (android), and ios using the native controls supported on those platforms.
- web applications supporting multiple platforms: single blazor project that supports an application that can work in browsers, on mobile devices and as a native desktop application (windows 10x for example)
- cloud native applications: high performance, single file (.exe) <50mb microservices and support for building multiple project (api, web front ends, containers) both locally and in the cloud.
- continuous improvements, such as: faster algorithms in the bcl, better support for containers in the runtime, support for http3.
today’s first preview does not contain all the work to support these high-level goals yet, but we will continue to announce more capabilities and features in future previews.
improvements in preview 1
the following improvements are in preview 1:
regular expression performance improvements
we’ve invested in significant improvements to the regex engine. on many of the expressions we’ve tried, these improvements routinely result in throughput improvements of 3-6x, and in some cases, much more. we have a blog post coming shortly that will describe these improvements in much more detail.
code quality improvements in ryujit
every release includes a set of performance improvements to the code that the jit generates. we refer to these type of improvements as “cq” or code quality. in most cases, these improvements also apply to the code generated for ready-to-run images.
the following improvements are in preview 1:
- improvements for null check folding – remove the need to generate null checks in more cases by observing more patterns where null checks are provably unnecessary.
- tuned common subexpression evaluation (cse) – the jit looks for and collapses duplicate expressions that only need to be evaluated once (wiki).
- optimizing “constant_string”.length – optimizing this pattern and collapsing the code down to the correct integer value.
- jit: build basic block pred lists before morph – re-order phases in the jit to allow key optimizations to be used earlier, resulting in better code quality and less work for the following phases, which increases jit throughput (“tp” in the referenced pr).
assembly load diagnostics added to event pipe
we have added assembly load information to event pipe. this improvement is the start of making similar diagnostics functionality available as is part of .net framework with the fusion log viewer. you can now use 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 trace assembly loading with event pipe. you can see assembly loading information for a simple test app.
event pipe profiler apis
event pipe is a new subsystem and api that we added in .net core 2.2 to make it possible to on any operating system. in .net 5.0, the event pipe has been extended to enable profilers to write event pipe events. this scenario is critical for instrumenting profilers that previously relied on etw to monitor application behavior and performance.
github repo consolidation
as part of the .net 5 release, we reduced the number of github repos we use to build and package .net. repo boundaries have a significant impact on many aspects of a project, including builds and issue management. with .net core 1.0, we had over 100 repos across asp.net, ef and .net core. with this latest release, we can now count the primary repos on one hand. we also moved nearly all repos to the dotnet org.
check out the new, consolidated, repos:
- (was dotnet/corefx, dotnet/coreclr, and dotnet/core-setup)
- (was several repos in the aspnet org)
- (was dotnet/sdk, dotnet/cli)
we hope that you are excited about the work that is happening with .net 5! the best way to prepare for .net 5 is to move all of our .net core applications to 3.1- we will make the transition from .net core 3.1 to .net 5 as painless as possible. and if you are still building applications on .net framework, please feel safe leaving those applications on .net framework but think of using .net core 3.1 for all your new applications. there are lots of exciting things coming to .net!