Menu
What’s new in Microsoft .NET 5

What’s new in Microsoft .NET 5

Aimed at unifying the .NET platform, .NET 5 brings improvements to RyuJIT code quality, garbage collection, and JSON serialization, for starters

microsoft-store-100850225-orig.jpg

microsoft-store-100850225-orig.jpg

Credit: Microsoft

Microsoft has published a sixth preview of .NET 5. Preview 6 removes WinRT support, adds support for Windows Forms on Windows ARM64 devices, and continues to extend RyuJIT code quality improvements.

Microsoft has said that .NET 5 would be feature-complete by Preview 7. .NET 5 is a merger of .NET Framework and .NET Core that is intended to unify the .NET platform. The new platform is due for general availability November 10, 2020.

High-level goals for .NET 5 include providing a unified .NET SDK experience, with a single BCL (base class library) across all .NET 5 applications, and with support for both native and web applications across multiple operating systems. A single .NET 5 native application project would support targets such as Windows, Microsoft Duo (Android), and Apple iOS using native controls on those platforms.

Additional goals of .NET 5 include support for building high-performance cloud applications, faster algorithms in the BCL, better support for containers in the runtime, and support for HTTP3. 

.NET 5 Preview 6, released June 25, removes built-in support for WinRT (Windows Runtime), a collection of APIs for building Universal Windows Platform applications. This is a breaking change; .NET Core 3.x apps using WinRT must be recompiled. The .NET and Windows teams have been working to change the way WinRT works with Windows, replacing WinRT support with the C#/WinRT toolchain in .NET 5. C#/WinRT is a NuGet-packaged toolkit offering WinRT projection support for C#.

Other changes in .NET 5 Preview 6: 

.NET 5 Preview 5, released June 10, contains the following new features:

  • The RyuJIT JIT compiler has a faster, portable implementation of tailcall helpers. The JIT asks the runtime for help whenever it realizes it will need a helper to perform a tailcall. Also for RyuJIT, there has been continued progress in the ARM64 hardware intrinsics implementation. Other improvements in the RyuJIT involve better speed in a case that was affecting regular expression compilation and improved Intel architecture performance.
  • Exports for native binaries with calls into .NET code have been enabled. The building block of this capability is hosting API support for UnManagedCallersOnlyAttribute. The native exports project enables exposing of custom native exports. It does not require a higher-level interop technology like COM and is cross-platform.
  • DirectoryServices.Protocols support is being expanded to Linux and MacOS.
  • The Alpine 3.12 Linux distribution now is supported.

The .NET 5.0 preview can be downloaded from dot.net.microsoft.com.

.NET 5 Preview 4, released on May 19, introduced the following new capabilities:

  • C# 9 and F# 5 language support.
  • Improved performance of tailcalls used by F#.
  • Improved performance of ToUpperInvariantstring.ToLowerInvariant, and related patterns.
  • Improved HTTP 1.1 and HTTP 2 performance.
  • An improved call counting mechanism.
  • Dynamic expansion of the internal generic dictionary to eliminate performance cliffs hit by generic code.
  • A pinned object heap to reduce heap fragmentation.
  • Single file applications based on a new single file publishing type that executes an application from a single binary.

Microsoft .NET 5 Preview 4 can be downloaded from dotnet.microsoft.com.

Enhancements in .NET 5 preview 3, unveiled April 23, include the following: 

  • The BitArray class for managing an array of bit values was updated to include a hardware-accelerated implementation for ARM64 using ARM64 intrinsics. BitArray performance improvements are significant, Microsoft said. In addition, On Stack replacement (OSR) in the CLR was implemented to allow code executed by currently running methods to be changed in the middle of method execution, while those methods are active “on stack.” This capability, to improve performance characteristics of tiered compilation, is now an experimental, opt-in feature on x64. Another enhancement for RyuJIT improves code quality for structs as arguments in “tail call” position calls. RyuJIT also is expected to offer better performance of generics. 
  • The addition of support for preserving references was added to System.Txt.Json, enabling reference loop handling for JSON serialization. Also, immutable classes and structs are now supported for JsonSerializer. Also supported now is null value handling.
  • The .NET SDK now will auto-reference the NETFramework.ReferenceAssemblies NuGet package given a .NET Framework target framework in a project file. This change enables the building of .NET Framework projects on a machine without a .NET Framework targeting pack installed. This improvement is specific to targeting packs and does not account for other possible project dependencies.

Specific enhancements in .NET 5 preview 2, released April 2, included: 

  • A number of changes have been made to RyuJIT to improve the quality of the machine code generated, including duplicate zero initializations being eliminated more aggressively and nullable box optimizations invoked earlier.
  • Server garbage collection on different threads now can work-steal while marking gen0/1 objects held live by older generation objects. Work stealing across threads shortens ephemeral GC pauses for scenarios where some GC threads took much longer to mark than others. In addition, part of the Pinned Object Heap (POH) feature has been implemented, the part internal to garbage collection, to allow the collector to manage pinned objects separately. This avoids the negative effects of pinned objects on generational heaps.

Preview 1, released March 16, included regular expression performance improvements as well as code quality enhancements in RyuJIT.

Due as a production release in November 2020, .NET 5 is set to include:

  • ASP.NET Core, an open source framework for web applications.
  • Entity Framework Core data access technology.
  • WinForms.
  • WPF (Windows Presentation Foundation).
  • Xamarin mobile app device model.
  • ML.NET.

Microsoft is offering a preview .NET 5 SDK and an accompanying runtime preview. Microsoft said that .NET 5 will provide a single, unified platform for building any type of application. The company is directing half of the traffic to its .NET website traffic to a .NET 5 version as a test case, using Azure load-balancing. 

Microsoft recommends that developers build new applications with .NET Core 3.1 and then migrate them to .NET 5. The company noted that .NET Framework applications can be left on .NET Framework, which will remain supported for as long as Windows itself is supported.



Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags MicrosoftWindows.NET 5

Events

Featured

Slideshows

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

This year’s Reseller News 30 Under 30 Tech Awards were held as an integral part of the first entirely virtual Emerging Leaders​ forum, an annual event dedicated to identifying, educating and showcasing the New Zealand technology market’s rising stars. The 30 Under 30 Tech Awards 2020 recognised the outstanding achievements and business excellence of 30 talented individuals​, across both young leaders and those just starting out. In this slideshow, Reseller News honours this year's winners and captures their thoughts about how their ideas of leadership have changed over time.​

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners
Reseller News Exchange Auckland: Beyond the myths — how partners can master cloud security

Reseller News Exchange Auckland: Beyond the myths — how partners can master cloud security

This exclusive Reseller News Exchange event in Auckland explored the challenges facing the partner community on the cloud security frontier, as well as market trends, customer priorities and how the channel can capitalise on the opportunities available. In association with Arrow, Bitdefender, Exclusive Networks, Fortinet and Palo Alto Networks. Photos by Gino Demeer.

Reseller News Exchange Auckland: Beyond the myths — how partners can master cloud security
Reseller News welcomes industry figures at 2020 Hall of Fame lunch

Reseller News welcomes industry figures at 2020 Hall of Fame lunch

Reseller News welcomed 2019 inductees - Leanne Buer, Ross Jenkins and Terry Dunn - to the fourth running of the Reseller News Hall of Fame lunch, held at the French Cafe in Auckland. The inductees discussed the changing face of the IT channel ecosystem in New Zealand and what it means to be a Reseller News Hall of Fame inductee. Photos by Gino Demeer.

Reseller News welcomes industry figures at 2020 Hall of Fame lunch
Show Comments