What’s New in .NET 9: Latest Enhancements
Stay informed about .NET 9 preview which include its features, performance upgrades, and development techniques to simplify the processes involved in building. Building reliable and scalable software applications becomes easy by leveraging its security enhancement, debugging system, codebase optimization, and compatibility. All of which makes this tool suitable for the development of software.
Table of Contents
What is .NET 9?
Different platforms such as desktop, mobile, web, and cloud can have applications developed for them without hassle with the .NET 9. Because this tool is cross-platform, and open-source, hence it is possible to build software applications for Windows, Linux, and macOS. This current release focuses on modifying coding techniques that will make the development process faster. Modifications were made to its performance optimization, cloud-native applications, and the integration of artificial intelligence.
This toolbox offers support for serverless computing, microservices, and containerization, for easy build and deployment of applications in the cloud environments. A good development experience with new upgrades to the software development kit, for better debugging and completion of code. An optimization of the runtime, Just-In-Time Compiler, and garbage collector are some of the new features that help developers write quality codes. Updated API functionalities, ensuring that developers have resources available to them to build their applications.
Preview of the .NET 9
In September 2024, there was a release of the .NET 9 release candidate 1 (RC1). Developers can get acquainted with the platform and give comments based on the preview. On GitHub discussion, the technical team will be sharing announcements and preview updates.
The release candidate includes major modifications to the Native Ahead-of-Time Compilation (AOT). This creates native codes that run on the computer simultaneously while completing the application’s compilation. It can be used to create ASP.NET core-based cloud-native solutions.
ASP.NET Сore
- Improvement to SignalR distributed tracing. The Microsoft.AspNetCore.SignalR.Client has an ActivitiySource present in the .NET SignalR Client, a component responsible for distributed tracing, enabling the flow of requests across applications to be monitored as well as external services it exchanges information with.
- Keep-alive timeout for WebSockets. This determines the maximum duration of inactivity permitted before the WebSocket is declared closed. This can be used to build applications such that there won’t be leaks, and as long as they are in active use, only then is the connection maintained. The connection is considered closed when the server sends a ping frame with the WebSocket protocol, and there is no response from the client within the specified time.
- Keyed Dependency Injection in Middleware. An effective method of injecting many instances of the same service interface, into your middleware, each with a unique key. The handling of dependencies becomes flexible in middleware pipelines.
- Override InputNumber Type attribute. This component can be used to override the type of a number field attributes. With this attribute input type can be changed into a different value, such as range, text, etc.
- ASP.NET Core HTTPS Development certificate on Linux is reliable. To call the ASP.NET Core HTTPS, a development certificate to a reliable store on your Linux machine, Invoke the command dotnet dev-certs https –trust. Browsers such as Edge, Chrome, and Mozilla can trust the certificate of such development applications and establish a secure connection over HTTPS.
.NET Multi-platform App UI (MAUI)
A framework, that is cross-platform is used for building desktop and native mobile applications. This has some properties such as:
- Added HorizontalTextAlignment.Justify. This helps to properly align text within a layout so it is justified such that the margin of the left and right of the text is evenly distributed. Hence, when creating a design block of text this property aids It to look beautiful.
- HybridWebView Update. JavaScript methods can be directly invoked in the HybridWebView using C# code. This update supports both the synchronous and asynchronous method calls.
.NET Libraries
- WebSocket keep-alive Ping and Time out API. There are new APIs added in the update such as the ClientWebSocketOptions and WebSocketCreationOptions. They help to avoid wasteful resource use and handle connection activity.
- Add Zlib and Brotli compression option. Algorithmic compression level and strategy can be enabled through the middleware made available by the AddZlib and AddBrotli compression options in building web applications. The size of response data can be reduced with these compression methods which leads to rapid loading time and better user experience in applications.
- Add TarEntry.DataOffset. When creating a new entry in a tar archive, Add TarEntry.DataOffset property is used. The entry data exists inside a sub-stream that can be accessed using TarEntry.DataStream. The place where the entry data is stored is defined by the offset in the tar archive data stream. There are also APIs that support concurrent access with large TAR files.
- Header values are not logged by default, courtesy of HttpClientFactory. The HttpClientFactory logs LogLevel.Trace as an event that no longer holds the header value by default, this is to enhance security and privacy. Sensitive information that is included in the header, such as authentication tokens and personal data is now protected via the latest change.
- Out-of-Proc Meter Wild card listening. In order to be able to gather performance metrics from applications that are run in separate processes (i.e. out-of-process), a wildcard listener is used to achieve this. When building applications that use microservices architecture running different components in separate processes this feature helps in monitoring the processes. With the use of the wild card, the dotnet counter, a tool used for monitoring and can be used to listen to metrics.
.NET Software Development Kit (SDK)
This is a building block for applications using languages such as C#, F#, and VB.NET. It contains tools and libraries needed to build software. Some of it key components include:
- Unit testing with a better MSBuild integration which enables running a parallel test. This means that multiple tests can be executed simultaneously, so tests are run using multiple processors on a single machine in parallel instead of running them one after another.
- NuGet, a package manager that can be used to share and reuse code libraries and frameworks, has a security audit that can work properly on direct and transitive package references by default.
- During development, the terminal logger is enabled by default. It helps to identify and count the total number of failures and warnings when the build is complete.
- SDK can easily detect and adjust concerning version mismatch between .NET SDK and MSBuild.
- The dotnet workload history provides details about the performance and usage of resources of an application over an extended period of time. Various metrics of an application workload can be evaluated, showing the modification and installation of the current workload history.
The .NET SDK makes all the current updates made accessible easily with more changes coming as the official release date draws closer. Whether you are a Linux, Windows, or macOS user, you can begin to explore the .NET 9 and get completely set for the actual launch date.
Key Upgrades in the .NET 9
This new version poses some upgrades over the previous one. Its performance is very visible due to the Native Ahead-of-Time Compilation, which enables applications to start functioning faster. Initially, some of its previous versions offered cloud-native app development as a microservice, but its current update expands on this with integration with systems such as Azure.
Another important development is its support for applications powered by artificial intelligence. The process of implementing artificial intelligence becomes simplified as developers can build data-driven and smart applications with fewer codes. Building user interface designs for applications using the .NET Multiplatform application UI across different platforms. It still maintains its ability to work with .NET 8, enabling an easy upgrade.
.NET 9 Core Features
Microsoft recognizes that developers who use .NET want to design creative, scalable, and reliable applications. The .NET 9 features comprise upgrades that simplify development processes. Below is an overview of what’s new in the most recent version of the .NET:
.NET Runtime
- The feature switch attribute is treated as constant with the use of FeatureSwitchDefinitionAttribute when trimming, and this enables useless code to be deleted. For codes that need dynamic features, the FeatureGuardAttributes uses properties, which are values evaluated at runtime, as guards in their execution.
- Garbage collection a technique used to manage the allocation of memory contains a dynamic adaption to application size feature that is used by default in developing applications.
ML.NET
The .NET 9 makes building artificial intelligence and machine learning models easier. In order to add artificial intelligence capabilities, such as image analysis and speech recognition, It can be integrated with TensorFlow, Azure Cognitive Services, and ML.NET. Tokenization is an important step in the setup of natural language material for generative artificial intelligence models. There exists a tokenizer functionality that enables it to interact with CodeGen and Tiktoken tokenizers.
.NET ASPIRE
This can be used to build production-ready, distributed applications, it is also a cloud-ready stack and is said to be opinionated, providing tools and resources for building data-driven and dynamic web applications.
EF Core
Entity Framework core includes an update Ahead-of-Time Compilation(AOT), a tool that compiles applications before running them making the process fast. It helps the application to start faster and consumes a small amount of memory. For large-scale or cloud applications where effectiveness is essential, It remains a suitable option, there is also an upgrade to database provider Azure Cosmos database for NoSQL.
C#13
It contains the .NET 9 SDK and other features such as:
- Params collection
- New lock type and semantics
- New escape sequence -\e
- Method group natural type improvement
- Implicit indexer access in the object initializer
With just one source codebase, the .NET 9 strengthens the .NET Multi-platform App UI, a tool that supports building interfaces for applications that function on iOS, Windows, Android, and macOS.
These are characteristics of the preview version, and more modifications will come with the final release based on additional components, bug fixes, and performance optimization.
Certified engineers
Convenient rates
Fast start
Profitable conditions
Agreement with
EU company
English and German
speaking engineers
.Net Service Development
Do you want to build software applications and make your business process easy to operate?.NET toolkit is your best bet. There are capable engineers here who can utilize the tool to create a solution that is scalable and flexible for your business operations. Whether you want to build new software or want to transition to another platform, there are .NET developers who can help you achieve that process so as to improve the procedures of a business from the design stage to planning and executing the solutions.
FAQ
When is the official release date for .NET 9?
At the .NET conference in November this year, the update will be formally launched. However, with the .NET Sofware Development Kit (SDK), you can check a release candidate version with the preview of Visual Studio.
What is the support of .NET 9 for cloud-native development?
The Integration of Kubernetes and Docker makes microservices easy to handle and deploy, and makes better the efficiency of ASP.NET core.
What does .NET 9 cryptographic operation entail?
This is a method used in computing hash, using hash data to select your desired algorithm which is handled with the Cryptographic Operations class for security measures in an application.
How do I download and set up the .NET 9 preview?
This updated version is a good tool for developing software applications because of the available enhancement it possesses. This can be used to build applications that perform well, and that are secured because of its security upgrade. However in order to check what this update holds, go to the .NET website, see the instructions, and follow its setup, also ensure to have the current Visual Studio Code version so you can conveniently run your codes.
Contact us to get the support of the expert team of Chudovo software engineers in order to use .NET 9 to solve your business problem.