Tech

Microsoft .NET 8 bolsters Linux support

.NET 8, the next planned version of the Microsoft’s open source software development platform, is set to emphasize Linux accommodations as well as cloud development and containers.

A first preview of .NET 8 is available for download at dot.microsoft.com for Windows, Linux, and macOS, Microsoft said on February 21. A long-term support (LTS) release that will be supported for three years, .NET 8 is due for production availability in November, a year after the release of predecessor .NET 7.

The new .NET release will be buildable on Linux directly from the dotnet/dotnet repository, using dotnet/source-build to build .NET runtimes, tools, and SDKs. This is the same build used by Red Hat and Canonical to build .NET. Over time, this capability will be extended to support Windows and macOS. Previously, .NET could be built from the source, but a “source tarball” was required from the dotnet/installer.

.NET 8 also will feature Ubuntu Chiseled images for appliance-style computing. And minimum baselines for Linux are being updated; the .NET product will be built targeting Ubuntu 16.04, for all architectures. For Red Hat Enterprise Linux, .NET 8 will support RHEL 8 and drop RHEL 7.

For cloud-native development, .NET 8 features improvements in how container images can be used for .NET applications, including publishing container images as non-root-capable. This is featured in .NET 8 Preview 1. Microsoft explained that, although container base images usually are configured to run with the root user, this is not always best. The .NET 8 container images will use Debian 12 (Bookworm) Linux, due in mid-year.

Preview and release candidate builds of .NET 8 will be published monthly. Other capabilities set for .NET 8 include:

  • NativeAOT (ahead-of-time) compilation, which provides benefits such as reduced memory footprint and improved startup time, is being expanded to more target application scenarios. In .NET 7, NativeAOT targeted console applications.
  • JSON improvements in Preview 1 include missing member handling, with .NET able to configure object deserialization behavior when the underlying JSON payload includes properties that cannot be mapped to members of the deserialized POCO type. Also, the source generator for JSON now supports serializing types with required and init properties, and System.Text.Json now supports serializing properties from interface hierarchies.
  • New types have been added to core libraries to enable developers to improve code performance in common scenarios. The System.Collections.Frozen namespace, for example, provides FrozenDictionary<TKey, TValue> and FrozenSet<T>. These types provide an immutable surface area in which no changes are permitted to the keys or values. Performance-focused hashing algorithms also have been added, including the XxHash3 and XxHash128 types.
  • For the .NET SDK, dotnet publish and dotnet pack produce Release assets by default.

Plans for the .NET MAUI (Multi-platform App UI) cross-platform development framework for the .NET 8 development timeframe involve improving the upgrade path from Xamarin to .NET, speeding up UI rendering, and reducing developer inner-loop time. With .NET MAUI, developers can build native mobile and desktop apps with C# and XAML.

Copyright © 2023 IDG Communications, Inc.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button