What Is New in .NET Core 3.1
.NET Core 3.1 is a Long Term Support (LTS) release focused on stability and refinements over the major feature additions in version 3.0. It introduces a small set of new features while primarily addressing issues from the previous release.
| Category | Key Changes |
|---|---|
| New Features | iOS & macOS support for AES-GCM, AES-CCM crypto; Component-based macOS hosting |
| Improvements | Visual Studio 16.4 support; Windows Forms controls accessibility |
| Deprecated | ASP.NET Core Shared Framework; Several WinForms APIs |
| Target Frameworks | New netcoreapp3.1 and netstandard2.1 |
What cryptographic enhancements were added?
.NET Core 3.1 brings support for authenticated encryption modes to Apple platforms. The AesGcm and AesCcm classes, previously only available on Windows, are now fully supported on iOS and macOS.
This matters because it enables consistent cross-platform cryptography for secure communication scenarios. You can now use the same high-performance AES-GCM code on all supported operating systems.
// Example of using AesGcm on macOS or iOS
var key = new byte[16];
var nonce = new byte[12];
var plaintext = new byte[100];
var ciphertext = new byte[100];
var tag = new byte[16];
using (var aesGcm = new AesGcm(key))
{
aesGcm.Encrypt(nonce, plaintext, ciphertext, tag);
}
How did macOS hosting improve?
The macOS hosting model received significant improvements for component-based scenarios. The runtime now better supports being loaded as a component into native macOS applications through the nethost library.
In practice, this makes it easier to embed .NET Core within existing native macOS applications. You can host the runtime and execute managed code alongside your Objective-C or Swift code more reliably.
Which features were deprecated in this release?
.NET Core 3.1 marked several technologies as obsolete. The ASP.NET Core Shared Framework is deprecated in favor of framework-dependent deployments using the ASP.NET Core NuGet package.
Additionally, over 20 Windows Forms APIs were marked as obsolete, primarily related to outdated visual styles and rendering. The compiler will generate warnings if you use these APIs, giving you time to migrate to modern alternatives before they're potentially removed.
What about Visual Studio integration?
.NET Core 3.1 requires Visual Studio 2019 version 16.4 or later for optimal development experience. This version of Visual Studio provides full support for all the new features and improvements in the runtime.
The tooling includes updated project templates, debugging support, and deployment tools specifically tuned for the 3.1 LTS release. If you're maintaining long-term projects, this is the version you'll want to standardize on.
FAQ
Is .NET Core 3.1 a major feature release?
No, it's primarily a stabilization release. The major features came in .NET Core 3.0, and 3.1 focuses on polishing those features, addressing issues, and providing long-term support.
Why should I target netcoreapp3.1 instead of netcoreapp3.0?
You should prefer netcoreapp3.1 because it's the Long Term Support (LTS) version with three years of support, while netcoreapp3.0 reached end-of-life in March 2020.
Can I use C# 8.0 with .NET Core 3.1?
Yes, .NET Core 3.1 fully supports C# 8.0 features including nullable reference types, async streams, ranges and indices, and default interface methods.
What's the difference between netstandard2.1 and netcoreapp3.1?
netstandard2.1 is a specification that multiple .NET implementations can support, while netcoreapp3.1 is a specific implementation (.NET Core) that implements that specification plus additional application-specific APIs.
Are Windows Forms and WPF supported on Linux or macOS?
No, Windows Forms and WPF remain Windows-only technologies. The improvements in 3.1 are focused on making them better on Windows, not cross-platform.