Announcing .NET 5.0 Preview 3
Today, we’re releasing .NET 5.0 Preview 3. It contains a set of new features and performance improvements. We’re continuing to work on the bigger features that will define the 5.0 release. The .NET 5.0 Preview 1 post covers what we are planning on building for .NET 5.0. Please take a look at the post and the dotnet/designs repository and share any feedback you have. And, of course, please install Preview 3, and test your workloads with it.
You can download .NET 5.0 Preview 3, for Windows, macOS, and Linux:
ASP.NET Core and EF Core are also being released today.
You need to use Visual Studio 2019 16.6 to use .NET 5.0. Install the latest version of the C# extension, to use .NET 5.0 with Visual Studio Code. .NET 5.0 isn’t yet supported with Visual Studio for Mac.
Release notes:
Let’s look at some of the improvements in Preview 3.
Code quality improvements in RyuJIT
Every release includes a set of changes that improve the machine code that the JIT generates (we call this “code quality”). Better code quality means better application performance.
- Vectorise BitArray for ARM64 – dotnet/runtime #33749 — The BitArray class was updated to include a hardware-accelerated implementation for ARM64 using ARM64 intrinisics. The performance improvements for BitArray are very significant. Credit to @Gnbrkm41.
- Implement simple version of On Stack Replacement (OSR) – dotnet/runtime #32969. On-stack replacement (OSR) is a new capability that allows the code executed by currently running methods to be changed in the middle of method execution, while those methods are active “on stack”. This feature is currently experimental and opt-in (on x64), and targeted at improving the more challenging performance characteristics of tiered compilation. Please try it out and give us feedback.
- Dynamic generic dictionary expansion feature dotnet/runtime #32270 – Some (maybe many) uses of generics now have better performance (initial performance findings), based on improving the implementation of low-level (native code) dictionaries used by the runtime to store information about generic types and methods. See Perf: Collection Count() is Slower in Core than the CLR for more information. Credit to @RealDotNetDave for the bug report.
- Implement Vector.Ceiling / Vector.Floor dotnet/runtime #31993 – Implement Vector.Ceiling / Vector.Floor using x64 and ARM64 intrinsics, per API proposal. Credit to @Gnbrkm41.
- JIT: allow CORINFO_HELP_READYTORUN_GENERIC_HANDLE to be optimized dotnet/runtime #34221. Improves code quality for generics in Ready2Run images.
- JIT: enable tail calls and copy omission for implicit byref structs #33004. Improves code quality for structs as arguments in “tail call” position calls.
System.Text.Json improvements
- Add support for preserve references on JSON dotnet/runtime #655 – Enables
ReferenceLoopHandling
, which is one of the key features of JSON.NET serialization. - Add new System.Net.Http.Json project/namespace dotnet/runtime #33459 – Adds new extension methods for HttpClient that allow serialization from/to JSON.
- Add
JsonConstructor
and support for deserializing with parameterized ctors dotnet/runtime #33444 — Adds support for immutable classes and structs to JsonSerializer. - Add JsonIgnoreCondition & per-property ignore logic #34049 – Adds support for null value handling, which is another feature of JSON.NET serialization.
.NET SDK Support for .NET Framework Assemblies
The .NET SDK will now auto-reference the Microsoft.NETFramework.ReferenceAssemblies NuGet package given a .NET Framework target framework in a project file. This change enables building .NET Framework projects on a machine without the required .NET Framework targeting pack installed. This improvement is specific to targeting packs, and doesn’t account for other dependencies that a project may have.
Closing
Please take a moment to try out Preview 3, possibly in a container, a VM. We’d like your feedback on the quality of the release. There is a lot more coming, over the next several months, leading up a November release.
22 comments
Will ASP.NET (now “classic”) that target .Net Framework 4.x will works with .NET 5???
The short answer is no.
Microsoft has said from the very first .net 5 announcement that .net 5 is the current .net core rebranded to .net 5 as a clear sign to developers that it is the next .net and the one to be using moving forward. So Microsoft is skipping .net core 4.x and rebranding to .net 5 to show everyone it is the next major release of .net.
The existing .net framework is for legacy code bases that are not supported in the current .net core technologies and Microsoft said they plan to do maintenance releases for existing .net framework to keep legacy apps working but no new features like c# 8.0 which only works on .net core/.net 5 not on the now legacy .net framework.
What about the plan of Xamarin in .Net5 ?
What is the plan for Windows.Devices in .NET5. I have not been able to find information on this value namespace’s future. There is support for GPIO, ADC, PWM and other devices within this namespace. It would be valuable to support this across platforms.