.NET Core 3.1: What's in it for me?
In early December 2019, Microsoft released several new versions of the .NET Framework, including .NET Core 3.1. In line with the release, ASP.NET Core and the Entity Framework (EF Core) have also been released in version 3.1 along with Visual Studio 2019 version 16.4.
The LTS release has three years of support and offers projects planning security. It should be a slightly improved version compared to .NET Core 3.0, the focus of which is stability.
It is recommended that you quickly switch to .NET Core 3.1, as the previous versions will be removed from the support between December 23, 2019, and August 2021. .NET Core 3.1 is to receive three years of long-term support, but only a few features have been changed compared to .NET Core 3.0. Version 3.0 was only released around three months ago and, according to Microsoft, already had a stable version. With the LTS release, .NET Core 3.1 is now viable for business applications and ready for production, says Microsoft as per the release announcement.
Most significant innovations: Blazor and Windows Desktop
The changes to .NET Core 3.1 mainly concerned Blazor and Windows Desktop, the two new and essential additions to .NET Core 3.0. It includes support for C ++/CLI, a common request from developers targeting Windows.
The following changes for Blazor are included: Razor components get partial class support; top-level components can get pass parameters. There is a new tool for tagging components. For events in Blazor, there is now a function that prevents default actions if necessary.
In the new version, developers can also prevent the propagation of events in Blazor apps. Detailed error messages can now be viewed while Blazor apps are being developed.
Support for shared queues in HTTP.sys
HTTP.sys provisions the creation of anonymous request queues. ASP.NET Core 3.1 has added the facility to create a named HTTP.sys request queue or to add items to such a queue. Creation of a named HTTP.sys request queue allows the HTTP.sys controller process to run on its own and independent of the listener process.
SameSite cookies changes
The performance of SameSite cookies has been changed according to upcoming browser changes, including the latest Chromium version of Microsoft Edge. This can affect authentication scenarios such as OpenIdConnect, Azure AD, or WsFederation.
Change in Form Controls - Some Controls are obsolete
Some form controls have been removed from .NET Core 3.1. It will affect ToolBar, DataGrid, Menu, ContextMenu, Menultem, and MainMenu. They were replaced in 2005 by .NET Framework 2.0 with more robust controls. In the Visual Studio Designer Toolbox, they were no longer included as standard for a long time.
Microsoft says that you will see build crashes if you use the controls that have been removed in your applications. Also, if you open .NET Core 3.0 applications in the latest versions of the Windows .NET Core form designer, errors will appear if you use these controls. Also, the publisher recommends updating your applications to .NET Core 3.1 and switching to alternative controls. Replacing controls is a straightforward process, primarily “search and replace.”
Microsoft’s goal is to continue improving Windows Forms for accessibility, high DPI, and reliability. The change to Form Control is necessary to create modern applications.
C ++ / CLI
Microsoft has added support for creating C ++ / CLI components that can be used from .NET Core 3.0 in Visual Studio 2019 version 16.4. To be able to use C ++ / CLI, you must install the "Desktop development with C++" workload and the "C ++ / CLI Support" component.
This component adds some templates that you can use:
- CLR Class Library (.NET Core);
- CLR Empty Project (.NET Core).
If you can’t find them, search for them in the New Project dialog.
C ++ / CLI is only enabled on Windows. You cannot use targeted C ++ / CLI components for the .NET Framework with the .NET Core or vice versa.
Operating system support
The following operating systems support .NET Core 3.1:
- Alpine from version 3.9;
- Debian from version 9;
- openSUSE from version 42.3;
- Fedora from version 26;
- Ubuntu from version 16.04;
- RHEL from version 6;
- SLES from version 12;
- macOS from version 10.13;
- Windows client: 7, 8.1, 10 (from build 1607)
- Windows Server from SP1 2012 R2 and onwards.
The version 3.1 of .NET Core is supported on the following chip:
- x64 architecture is supported on Windows, macOS, and Linux;
- x86 architecture is supported only on Windows;
- ARM32 architecture is supported on Windows and Linux;
- ARM64 architecture is supported on Linux (from kernel 4.14).
Switching to .NET Core 3.1 is recommended
The previous versions are now gradually dropping out of support; in some cases, they will soon have reached the end of their life. The support for .NET Core 2.2 ended on December 23, 2019. The .NET Core 3.0 will reach its end of support on March 3, 2020. Moreover, .NET Core 2.1 will continue to be updated until August 2021 (this was the last LTS release). Since the product life cycles of the previous versions are now closing, Microsoft recommends switching to .NET Core 3.1 as soon as possible.
- .NET Core 3.0 will reach the end of life on March 3, 2020.
- .NET Core 2.2 support ended on December 23, 2019.
- .NET Core 2.1 will be supported until August 2021 (it is also an LTS version).
Downloads & Services
Interested developers can download .NET Core 3.1 versions for Windows, macOS, and Linux directly from the .NET blog. The Docker images are on the DockerHub. Microsoft offers a Snap Installer as an installation aid.
For developers working with Visual Studio 2019, no separate download is required. The Visual Studio 2019 version 16.4 already includes .NET Core 3.1.
The innovations in ASP.NET Core 3.1 can be looked up in detail on the .NET blog. Interested developers can find the release notes for .NET Core 3.1 on GitHub.