Microsoft has revealed a second launch candidate for its upcoming .NET 6 software program growth platform.
The “go stay” launch candidate, .NET 6 RC2, was revealed October 12. RC2 has been examined on, and is supported on, Visible Studio 2022 Preview 5. The brand new launch candidate will be downloaded from dotnet.microsoft.com.
A bulletin on RC2 cites deliberate .NET 6 capabilities together with C# 10, which affords an additional evolution of recent options resembling information and patterns. Additionally featured for C# 10 are world utilizing directives and file-scoped namespaces, which assist builders simplify code and write much less boilerplate. C# 10 additionally helps document structs, just like C# 9 (class-based) information, however with variations resembling document structs being added for completeness so structs can have the identical document advantages as courses. One other characteristic in C# 10, file-scoped namespace declarations, is meant to scale back indentation and line rely.
Microsoft expects a manufacturing launch of .NET 6 to turn into accessible in November. Different plans for .NET 6 famous within the October 12 bulletin embrace:
- The .NET SDK was up to date so new options are on an opt-in foundation as of RC1, which was launched September 14. The next language options are utilized in new C# challenge templates: async Major, top-level statements, target-typed new expressions, world utilizing directives, file-scoped namespaces, and nullable reference varieties.
- Help for MacOS and Home windows Arm64 is sort of full. .NET 6 RC2 permits Arm64 + x64 coexistence by putting in Arm64 and x64 builds to totally different places. Builders must uninstall all .NET builds and begin from scratch on MacOS and Home windows Arm64 machines to undertake .NET 6 RC2 or later.
The subsequent technology of Microsoft’s software program growth platform, .NET 6 will end the components of the .NET unification begun in .NET 5. NET 6 is ready to ship enhancements for cloud, desktop, and cell apps. It is going to combine capabilities for Android, iOS, and MacOS that at present reside within the Xamarin open supply cell .NET platform.
Microsoft is also extending the Blazor shopper internet app growth instrument, so builders can construct a hybrid shopper app that mixes internet and native UIs for desktop and cell utilization. Blazor WebAssembly was the primary unified platform deliverable in .NET 5. Revealed in November 2020, .NET 5 marked the start of unification and laid the groundwork for Xamarin builders to make use of the unified .NET platform when .NET 6.0 arrived.
The .NET unification creates one .NET from the separate .NET Core, .NET Framework, and Xamarin/Mono applied sciences. Elements of .NET Framework already had moved to .NET Core; .NET 5 started the journey of mixing .NET Core and Mono/Xamarin on a base class library and toolchain.
Unveiled September 14, Microsoft .NET 6 RC1 was preceded by seven preview releases. RC1 has been examined with and is supported with Visible Studio 2022 Preview 4. In a bulletin on the RC, Microsoft lined foundational options in .NET 6:
- Supply construct, a state of affairs and infrastructure being developed with Crimson Hat that’s meant to fulfill packaging guidelines of generally used Linux distributions, resembling Debian and Fedora. Additionally, supply construct is meant to allow .NET Core contributors to construct a .NET Core SDK with coordinated adjustments in a number of repositories. The expertise is meant to unravel widespread challenges that builders encounter when making an attempt to construct the entire .NET Core SDK from supply.
- Profile-guided optimization, which relies on the belief that code executed as a part of a startup usually is uniform and that larger stage efficiency will be delivered by leveraging it. PGO can compile startup code at larger high quality, cut back binary measurement, and rearrange utility binaries so code used at startup is co-located close to the beginning of the file.
- Dynamic PGO, a mirror picture of PGO, built-in with the RyuJIT .NET just-in-time compiler. Efficiency is improved.
- HTTP/3, previewed in .NET 6, solves practical and efficiency challenges with earlier variations of HTTP.
- CrossGen 2, for ahead-of-time pre-compilation.
- Intel Management Enforcement Expertise (CET), accessible in some new Intel and AMD processors to guard in opposition to widespread varieties of assaults involving control-flow hijacking.
- W^X, a safety mitigation to dam assault paths by disallowing reminiscence pages to be writable and executable on the similar time.
Previous to RC1, Preview 7, revealed August 10, polished varied options. Preview 7 included:
- Up to date .NET SDK templates to make use of the newest C# options.
- For the libraries, reflection APIs for nullability data have been highlighted.
- Generic math, a .NET 7 early preview characteristic.
- Native reminiscence allocation APIs, additionally a library characteristic.
System.Textual content.Jsonserialization notifications and
System.Textual content.Jsonproperty ordering. Each are library options.
- For libraries, there are simplified name patterns for cryptographic operations.
Preview 6, unveiled July 14, highlighted capabilities together with:
- .NET SDK non-obligatory workload enhancements.
- TLS help for
- Improved sync-over-async efficiency.
Capabilities cited in Preview 5, launched June 17, included:
- SDK workloads, a part of the .NET unification imaginative and prescient, helps further utility varieties resembling cell and WebAssembly with out rising the dimensions of the SDK. The characteristic has been up to date to incorporate
replaceverbs, with the
dotnetworkload checklistfunctionality telling a developer which workloads have been put in and the
dotnet workload replacecharacteristic used to replace all put in workloads to the latest accessible model. Serving as a package deal supervisor, SDK workloads was launched in Preview 4.
- Bundle validation instruments allow NuGet library builders to validate that packages are constant and well-formed.
- Extra analyzers for the Roslyn compiler platform.
- For the SDK, customized guards are enabled for the Platform Compatibility analyzer,
- For Home windows Kinds, a default font will be set for an utility.
ExtensionsAPIs have been improved, with a concentrate on internet hosting and dependency injection.
- WebSocket compression for libraries reduces the quantity of knowledge transmitted over a community.
- Help for older frameworks is being dropped, together with frameworks older than .NET Framework 4.6.1, .NET Core 3.1, and .NET Normal 2.0.
- A supply generator is being launched in .NET 6 as a part of
textual content.jsonto scale back startup time, enhance throughput, and cut back personal reminiscence utilization.
- For Goal-C interop, a brand new .NET API permits a single expertise throughout runtimes.
- OpenTelemetry Metrics API help has been added. OpenTelemetry, which has been supported in latest .NET variations, promotes observability.
- OpenSSL 3 help has been added for cryptography on Linux.
Launched Could 25, Preview 4 established a stable base for the ultimate .NET 6 construct, having completed options and experiences. “Go stay” builds, that are supported in manufacturing, are anticipated in August.
In its bulletin on Preview 4, Microsoft cited eight themes for .NET 6:
- Interesting to new builders and college students.
- An incredible shopper growth expertise.
- Being acknowledged as a compelling framework for constructing cloud native apps.
- Delivering less complicated and extra predictable fashions for utilizing .NET with mission-critical apps and extra carefully catering to the wants of huge enterprise and authorities prospects.
- Bettering “internal loop” efficiency for .NET builders, with productiveness enhancements for construct efficiency, scorching restart, and scorching reload.
- Rising the .NET ecosystem via elevated confidence, high quality, and help.
- Bettering startup and throughput utilizing runtime execution data.
- Assembly developer expectations.
New options in Preview 4 embrace:
- Enhancements to Scorching Reload, offering an expertise to make edits in supply code whereas the code is operating with no need to manually pause an app or hit a breakpoint. Developer productiveness is improved. With this launch, Scorching Reload works for a lot of varieties of apps resembling WPF, Home windows Kinds, WinUI, ASP.NET, Console Apps, and different frameworks on high of the CoreCLR runtime. The expertise is also to be dropped at WebAssembly, iOS, and Android apps that run on Mono at a later date.
Textual content.Jsonhelp for
System.Textual content.Json(de)serialization with
System.Textual content.Jsonnow helps serializing
IAsyncEnumerable<T>objects as JSON arrays.
- The writeable JSON DOM characteristic as an easy and high-performance programming mannequin for
Textual content.Json, offering an API to keep away from complexity of serialization and the normal price of a DOM.
- Considerably improved
FileStreamefficiency on Home windows.
LoggerMessageAttributekind source-generates performant logging APIs.
- Linq enhancements with new APIs.
- RyuJIT compiler enhancements.
- Enhanced date, time, and time zone help.
- For IL (intermediate language) trimming, warnings are enabled by default. Trim warnings apprise builders about locations the place trimming could take away code that’s used at runtime.
- Single-file utility publishing enhancements together with improved evaluation to permit for customized warnings.
- Single-file bundles now help compression.
- Constructed-in SDK model checking is supplied.
- Crossgen2, to generate and optimize code through ahead-of-time compilation, is now enabled by default when publishing ReadyToRun photos.
Preview 3, unveiled on April 8, featured the next additions and enhancements:
- A brand new
unsafeAPI, CollectionsMarshal.GetValueRef, makes updating struct values in dictionaries quicker. This API is meant for high-performance eventualities.
- Interface casting efficiency has been improved by 16 p.c to 38 p.c, which is especially helpful for C# sample matching to and between interfaces.
- Code technology has been improved in RyuJIT through a number of adjustments, to make the method extra environment friendly or ensuing code run quicker.
- Early help for .NET Scorching Reload turned accessible for ASP.NET Core and Blazor tasks utilizing
dotnet watch. This was step one in a extra complete plan to convey this expertise to all .NET builders, supporting desktop growth, cross-platform shopper eventualities in .NET MAUI (Multi-platform App UI), and extra.
Preview 2, revealed March 17, featured API and library enhancements, runtime efficiency boosts, and early builds of .NET MAUI (Multi-platform App UI), which is a contemporary UI toolkit that builds upon Xamarin. Microsoft’s bulletin on Preview 2 additionally emphasised themes for the platform resembling enhancing “internal loop” efficiency, i.e., optimizing the instruments and workflows used continuously and repeatedly by builders to replace, construct, and take a look at their code. Scorching reloads, for instance, will enhance developer productiveness by enabling code to be edited whereas an app is operating, even with out a debugger hooked up. Runtime startup efficiency, utility fashions, the dotnet CLI, and MSBuild are additionally getting consideration as a part of the internal loops theme.
One other theme is enhancing the shopper app growth expertise, together with a extra unified cell product for .NET. As a part of this effort, iOS, Android, and MacOS growth shall be built-in into the .NET SDK expertise and use .NET libraries. As well as, the Xamarin.Kinds cross-UI framework is evolving into .NET MAUI, which can permit builders to create apps for Android, Home windows, and MacOS from the identical codebase. Blazor apps will run natively on Home windows and MacOS through .NET MAUI.
Microsoft additionally touted the addition of APIs and enhancements to .NET libraries. For instance,
System.Tex.Json) now helps the flexibility to disregard cycles when serializing an object graph, whereas
PriorityQueue<TElement.TPriority> is a brand new assortment that permits the addition of recent gadgets with a price and a precedence. Preview 2 additionally introduced higher parsing of ordinary numeric codecs in addition to runtime and JIT enhancements.
Preview 1, unveiled February 17, launched Android and iOS as the primary two platforms supported in MAUI. Future previews will add MacOS and Home windows desktop help. Blazor, which is constructed on high of MAUI, depends on the UI stack for a local utility container and native utility container controls.
Copyright © 2021 IDG Communications, Inc.