NET Core 3.0 Arrives
Microsoft officially announced .NET Core 3.0, an important milestone in the company's transition from the traditional, proprietary, Windows-only .NET Framework to a new open source, cross-platform offering -- the new direction for .NET developers.
The milestone's importance comes from the addition of crucial new capabilities, such as desktop development, that weren't available in prior versions.
"It includes many improvements, including adding Windows Forms and WPF, adding new JSON APIs, support for ARM64 and improving performance across the board," said exec Richard Lander in a post published during the virtual reveal event, .NET Conf. "C# 8 is also part of this release, which includes nullable, async streams, and more patterns. F# 4.7 is included, and focused on relaxing syntax and targeting .NET Standard 2.0. You can start updating existing projects to target .NET Core 3.0 today. The release is compatible with previous versions, making updating easy."
The three-day online event has dozens of presentations scheduled for developers to learn all there is to know about the new offering, ranging from the "The Future of Blazor on the Client" (which, due to lagging development issues, wasn't fully ready for .NET Core 3.0) to "Architecting .NET Microservices in a Docker Ecosystem."
.NET components ASP.NET Core 3.0 (which includes Blazor) and EF Core 3.0 (the new direction of the traditional Entity Framework) and the holdover Entity Framework 6.3 have also gone GA.
As noted, the client-side effort (Blazor WebAssembly) still needs some work.
"There is also a Blazor WebAssembly preview update available with this release," Microsoft said in the ASP.NET Core 3.0 announcement post. "This update to Blazor WebAssembly still has a Preview 9 version, but carries an updated build number. Blazor WebAssembly is still in preview and is not part of the .NET Core 3.0 release."
Before going into deep dives into all the new .NET Core 3.0 functionality, Lander's post lists a 17-item "quick punch list" that provides a top-level view, here presented in its verbatim entirety:
- .NET Core 3.0 is already battle-tested by being hosted for months at dot.net and on Bing.com. Many other Microsoft teams will soon be deploying large workloads on .NET Core 3.0 in production.
- Performance is greatly improved across many components and is described in detail at Performance Improvements in .NET Core 3.0.
- C# 8 add async streams, range/index, more patterns, and nullable reference types. Nullable enables you to directly target the flaws in code that lead to
NullReferenceException. The lowest layer of the framework libraries has been annotated, so that you know when to expect
- F# 4.7 focuses on making some thing easier with implicit
yield expressions and some syntax relaxations. It also includes support for
LangVersion, and ships with
nameof and opening of static classes in preview. The F# Core Library now also targets .NET Standard 2.0. You can read more at Announcing F# 4.7.
- .NET Standard 2.1 increases the set of types you can use in code that can be used woth both .NET Core and Xamarin. .NET Standard 2.1 includes types since .NET Core 2.1.
- Windows Desktop apps are now supported with .NET Core, for both Windows Forms and WPF (and open source). The WPF designer is part of Visual Studio 2019 16.3 [which is needed for .NET Core 3.0 development and which also went GA today]. The Windows Forms designer is still in preview and available as a VSIX download [Note: clicking on link may initiate download].
- .NET Core apps now have executables by default. In past releases, apps needed to be launched via the
dotnet command, like
dotnet myapp.dll. Apps can now be launched with an app-specific executable, like
./myapp, depending on the operating system.
- High performance JSON APIs have been added, for reader/writer, object model and serialization scenarios. These APIs were built from scratch on top of
Span<T> and use UTF8 under the covers instead of UTF16 (like
string). These APIs minimize allocations, resulting in faster performance, and much less work for the garbage collector. See The future of JSON in .NET Core 3.0.
- The garbage collector uses less memory by default, often a lot less. This improvement is very beneficial for scenarios where many applications are hosted on the same server. The garbage collector has also been updated to make better use of large numbers of cores, on machines with >64 cores.
- .NET Core has been hardened for Docker to enable .NET applications to work predictably and efficiently in containers. The garbage collector and thread pool have been updated to work much better when a container has been configured for limited memory or CPU. .NET Core docker images are smaller, particularly the SDK image.
- Raspberry Pi and ARM chips are now supported to enable IoT development, including with the remote Visual Studio debugger. You can deploy apps that listen to sensors, and print messages or images on a display, all using the new GPIO APIs. ASP.NET can be used to expose data as an API or as a site that enables configuring an IoT device.
- .NET Core 3.0 is a ‘current’ release and will be superseded by .NET Core 3.1, targeted for November 2019. .NET Core 3.1 will be a long-term supported (LTS) release (supported for at least 3 years). We recommend that you adopt .NET Core 3.0 and then adopt 3.1. It’ll be very easy to upgrade.
- .NET Core 3.0 will be available with RHEL 8 in the Red Hat Application Streams, after several years of collaboration with Red Hat.
- Visual Studio 2019 16.3 is a required update for Visual Studio users on Windows that want to use .NET Core 3.0.
- Visual Studio for Mac 8.3 is a required update for Visual Studio for Mac users that want to use .NET Core 3.0.
- Visual Studio Code users should just always use the latest version of the C# extension to ensure that the newest scenarios work, including targeting .NET Core 3.0.
- Azure Web sites deployment of .NET Core 3.0 is currently ongoing.
The new desktop development capabilities are a highlight of the release, allowing the migration of countless numbers of Windows apps to the new platform.
"You can build WPF and Windows Forms apps with .NET Core 3, on Windows," Lander said. "We've had a strong compatibility goal from the start of the project, to make it easy to migrate desktop applications from .NET Framework to .NET Core. We've heard feedback from many developers that have already successfully ported their app to .NET Core 3.0 that the process is straightforward. To a large degree, we took WPF and Windows Forms as-is, and got them working on .NET Core. The engineering project was very different than that, but that's a good way to think about the project.
WPF apps targeting .NET Core can be done with Visual Studio 2019 16.3, featuring an updated XAML designer that comes with a slightly different experience. The WinForms designer, however, is still in preview [Note: clicking on link may initiate download].
".NET Core 3.0 is a major new release of .NET Core, and includes a vast set of improvements," Lander concluded. "We recommend that you start adopting .NET Core 3.0 as soon as you can. It greatly improves .NET Core in many ways, like the massive reduction in size of the SDK, and by greatly improving support for key scenarios like containers and Windows desktop applications. There are also many small improvements that were not included in this post, that you are sure to benefit from over time."
More information is provided in new ASP.NET Core 3.0 and EF Core 3.0/Entity Framework 6.3 announcement posts, and the release notes for .NET Core 3.0.
Going forward, the .NET Core roadmap shows a .NET Core 3.1 (Long Term Support) release that will include late-breaking functionality and bug fixes not able to be included in today's GA is scheduled for November. A completely unified .NET 5 release is expected to follow a year later, in November 2020.
David Ramel is an editor and writer for Converge360.