What’s new in Microsoft .NET 6
Microsoft has revealed a next release prospect for its future .Web six software program advancement platform.
The “go live” release prospect, .Web six RC2, was revealed Oct twelve. RC2 has been examined on, and is supported on, Visible Studio 2022 Preview 5. The new release prospect can be downloaded from dotnet.microsoft.com.
A bulletin on RC2 cites prepared .Web six capabilities such as C# ten, which presents a more evolution of new characteristics this kind of as records and designs. Also highlighted for C# ten are world-wide utilizing directives and file-scoped namespaces, which help builders simplify code and publish much less boilerplate. C# ten also supports report structs, similar to C# 9 (course-primarily based) records, but with variations this kind of as report structs staying extra for completeness so structs can have the very same report added benefits as lessons. A further function in C# ten, file-scoped namespace declarations, is meant to reduce indentation and line rely.
Microsoft expects a generation release of .Web six to come to be accessible in November. Other programs for .Web six noted in the Oct twelve bulletin include things like:
- The .Web SDK was updated so new characteristics are on an decide-in foundation as of RC1, which was launched September 14. The following language characteristics are utilized in new C# job templates: async Main, prime-degree statements, focus on-typed new expressions, world-wide utilizing directives, file-scoped namespaces, and nullable reference sorts.
- Support for MacOS and Windows Arm64 is virtually finish. .Web six RC2 enables Arm64 + x64 coexistence by setting up Arm64 and x64 builds to different destinations. Builders require to uninstall all .Web builds and start from scratch on MacOS and Windows Arm64 machines to undertake .Web six RC2 or afterwards.
The up coming technology of Microsoft’s software program advancement platform, .Web six will finish the components of the .Web unification begun in .Web 5. Web six is set to deliver advancements for cloud, desktop, and mobile applications. It will integrate capabilities for Android, iOS, and MacOS that at this time reside in the Xamarin open up resource mobile .Web platform.
Microsoft also is extending the Blazor customer world wide web application advancement resource, so builders can build a hybrid customer application that combines world wide web and native UIs for desktop and mobile use. Blazor WebAssembly was the initial unified platform deliverable in .Web 5. Printed in November 2020, .Web 5 marked the starting of unification and laid the groundwork for Xamarin builders to use the unified .Web platform when .Web six. arrived.
The .Web unification produces one .Web from the different .Web Main, .Web Framework, and Xamarin/Mono systems. Pieces of .Web Framework now experienced moved to .Web Main .Web 5 started the journey of combining .Web Main and Mono/Xamarin on a base course library and toolchain.
Unveiled September 14, Microsoft .Web six RC1 was preceded by 7 preview releases. RC1 has been examined with and is supported with Visible Studio 2022 Preview four. In a bulletin on the RC, Microsoft covered foundational characteristics in .Web six:
- Supply build, a scenario and infrastructure staying created with Pink Hat that is meant to satisfy packaging procedures of normally utilized Linux distributions, this kind of as Debian and Fedora. Also, resource build is meant to help .Web Main contributors to build a .Web Main SDK with coordinated adjustments in a number of repositories. The technological know-how is meant to resolve popular difficulties that builders come upon when making an attempt to build the total .Web Main SDK from resource.
- Profile-guided optimization, which is primarily based on the assumption that code executed as component of a startup normally is uniform and that increased degree functionality can be delivered by leveraging it. PGO can compile startup code at increased high quality, reduce binary measurement, and rearrange software binaries so code utilized at startup is co-located close to the start of the file.
- Dynamic PGO, a mirror graphic of PGO, integrated with the RyuJIT .Web just-in-time compiler. Overall performance is improved.
- HTTP/3, previewed in .Web six, solves functional and functionality difficulties with prior versions of HTTP.
- CrossGen two, for ahead-of-time pre-compilation.
- Intel Manage Enforcement Technological innovation (CET), accessible in some new Intel and AMD processors to defend against popular sorts of attacks involving control-stream hijacking.
- W^X, a stability mitigation to block assault paths by disallowing memory internet pages to be writable and executable at the very same time.
Prior to RC1, Preview seven, revealed August ten, polished a variety of characteristics. Preview seven integrated:
- Updated .Web SDK templates to use the hottest C# characteristics.
- For the libraries, reflection APIs for nullability information have been highlighted.
- Generic math, a .Web seven early preview function.
- Native memory allocation APIs, also a library function.
System.Textual content.Json
serialization notifications andSystem.Textual content.Json
home buying. Both equally are library characteristics.- For libraries, there are simplified phone designs for cryptographic functions.
Preview six, unveiled July 14, highlighted capabilities such as:
- .Web SDK optional workload advancements.
- TLS assist for
DirectoryServices.Protocols
. - Improved sync-over-async functionality.
Abilities cited in Preview 5, launched June 17, integrated:
- SDK workloads, component of the .Web unification eyesight, supports extra software sorts this kind of as mobile and WebAssembly without growing the measurement of the SDK. The function has been updated to include things like
checklist
andupdate
verbs, with thedotnetworkload checklist
functionality telling a developer which workloads have been installed and thedotnet workload update
function utilized to update all installed workloads to the most recent accessible edition. Serving as a deal manager, SDK workloads was launched in Preview four. - Bundle validation instruments help NuGet library builders to validate that deals are dependable and well-shaped.
- A lot more analyzers for the Roslyn compiler platform.
- For the SDK, personalized guards are enabled for the Platform Compatibility analyzer,
- For Windows Kinds, a default font can be set for an software.
Extensions
APIs have been improved, with a aim on hosting and dependency injection.- WebSocket compression for libraries decreases the total of knowledge transmitted over a network.
- Support for more mature frameworks is staying dropped, such as frameworks more mature than .Web Framework four.six.one, .Web Main 3.one, and .Web Standard two..
- A resource generator is staying launched in .Web six as component of
text.json
to reduce startup time, increase throughput, and reduce private memory use. - For Objective-C interop, a new .Web API enables a solitary encounter across runtimes.
- OpenTelemetry Metrics API assist has been extra. OpenTelemetry, which has been supported in the latest .Web versions, promotes observability.
- OpenSSL 3 assist has been extra for cryptography on Linux.
Produced Might twenty five, Preview four set up a strong base for the ultimate .Web six build, possessing completed characteristics and activities. “Go live” builds, which are supported in generation, are predicted in August.
In its bulletin on Preview four, Microsoft cited 8 themes for .Web six:
- Interesting to new builders and students.
- A good customer advancement encounter.
- Remaining regarded as a compelling framework for setting up cloud native applications.
- Delivering less difficult and much more predictable models for utilizing .Web with mission-vital applications and much more closely catering to the wants of huge company and government prospects.
- Improving “inner loop” functionality for .Web builders, with productivity advancements for build functionality, hot restart, and hot reload.
- Escalating the .Web ecosystem by means of enhanced self-assurance, high quality, and assist.
- Improving startup and throughput utilizing runtime execution information.
- Meeting developer anticipations.
New characteristics in Preview four include things like:
- Improvements to Hot Reload, furnishing an encounter to make edits in resource code when the code is running without needing to manually pause an application or strike a breakpoint. Developer productivity is improved. With this release, Hot Reload operates for quite a few sorts of applications this kind of as WPF, Windows Kinds, WinUI, ASP.Web, Console Apps, and other frameworks on prime of the CoreCLR runtime. The technological know-how also is to be brought to WebAssembly, iOS, and Android applications that operate on Mono at a afterwards date.
Textual content.Json
assist forIAsyncEnumerable
, enablingSystem.Textual content.Json
(de)serialization withIAsyncEnumerable
objects.System.Textual content.Json
now supports serializingIAsyncEnumerable
objects as JSON arrays.- The writeable JSON DOM function as a clear-cut and significant-functionality programming model for
Textual content.Json
, furnishing an API to prevent complexity of serialization and the traditional charge of a DOM. - Substantially improved
FileStream
functionality on Windows. - A
LoggerMessageAttribute
form resource-generates performant logging APIs. - Linq enhancements with new APIs.
- RyuJIT compiler advancements.
- Enhanced date, time, and time zone assist.
- For IL (intermediate language) trimming, warnings are enabled by default. Trim warnings apprise builders about spots the place trimming might take away code that is utilized at runtime.
- Single-file software publishing advancements such as improved evaluation to allow for personalized warnings.
- Single-file bundles now assist compression.
- Created-in SDK edition checking is presented.
- Crossgen2, to deliver and optimize code via ahead-of-time compilation, is now enabled by default when publishing ReadyToRun pictures.
Preview 3, unveiled on April eight, highlighted the following additions and advancements:
- A new
unsafe
API, CollectionsMarshal.GetValueRef, makes updating struct values in dictionaries speedier. This API is meant for significant-functionality scenarios. - Interface casting functionality has been improved by 16 p.c to 38 p.c, which is notably helpful for C# pattern matching to and involving interfaces.
- Code technology has been improved in RyuJIT via a number of adjustments, to make the course of action much more effective or ensuing code operate speedier.
- Early assist for .Web Hot Reload grew to become accessible for ASP.Web Main and Blazor initiatives utilizing
dotnet view
. This was the initial step in a much more detailed prepare to deliver this technological know-how to all .Web builders, supporting desktop advancement, cross-platform customer scenarios in .Web MAUI (Multi-platform App UI), and much more.
Preview two, revealed March 17, highlighted API and library advancements, runtime functionality boosts, and early builds of .Web MAUI (Multi-platform App UI), which is a modern UI toolkit that builds on Xamarin. Microsoft’s bulletin on Preview two also emphasized themes for the platform this kind of as bettering “inner loop” functionality, i.e., optimizing the instruments and workflows utilized usually and frequently by builders to update, build, and examination their code. Hot reloads, for illustration, will increase developer productivity by enabling code to be edited when an application is running, even without a debugger connected. Runtime startup functionality, software models, the dotnet CLI, and MSBuild are also acquiring attention as component of the interior loops topic.
A further topic is bettering the customer application advancement encounter, such as a much more unified mobile product for .Web. As component of this effort, iOS, Android, and MacOS advancement will be integrated into the .Web SDK encounter and use .Web libraries. In addition, the Xamarin.Kinds cross-UI framework is evolving into .Web MAUI, which will allow builders to build applications for Android, Windows, and MacOS from the very same codebase. Blazor applications will operate natively on Windows and MacOS via .Web MAUI.
Microsoft also touted the addition of APIs and advancements to .Web libraries. For illustration, JsonSerializer
(System.Tex.Json
) now supports the capacity to dismiss cycles when serializing an item graph, when PriorityQueue
is a new assortment that enables the addition of new merchandise with a worth and a precedence. Preview two also brought greater parsing of typical numeric formats as well as runtime and JIT advancements.
Preview one, unveiled February 17, launched Android and iOS as the initial two platforms supported in MAUI. Long run previews will incorporate MacOS and Windows desktop assist. Blazor, which is built on prime of MAUI, depends on the UI stack for a native software container and native software container controls.
Copyright © 2021 IDG Communications, Inc.