What's new in .Net 9?

November 12, 2024 Microsoft Technologies 3 mins read By Nikit Nandan

NET 9 is the most performant release of .NET yet with over 1,000 performance related changes across the runtime, workloads, and languages with more efficient algorithms that generate better code. Stephen Toub did a deep dive into .NET 9 performance improvements, that is a must read, but let’s discuss a few highlights in this release

 

 

The Server GC has been significantly changed to be adaptive to application memory requirements as opposed to the resources (memory and CPU) available in the environment (machine/VM/container). This change in approach has a profound impact in high core-count environments, where application memory is small or changes dramatically over time. Until now, Workstation and Server GC implementations delivered distinct results and required users to make tradeoff decisions between them. This change should be particularly attractive to anyone using workstation GC to control the memory use of cloud apps. The memory benefit comes with a modest throughput cost, which may or may not be observable. Server GC can be configured to use the legacy implementation, which may be useful for testing.

 

.NET Aspire – Foundational building blocks to build better apps

Today’s release of .NET Aspire 9 brings some of top requested features to help streamline app development. You can now start and stop resources from the dashboard, keep containers alive between debug sessions, and access new APIs including WaitFor to better manage resource startup. It provides new seamless Integrations for OpenAI, Ollama, Milvus, and many more. 

 



Artificial Intelligence – A Growing & Thriving AI Ecosystem

There are new learning materials and samples, simplified integrations into  ecosystem, collaborations with partners to build a vibrant AI community, and it is more seamless than ever to deploy AI solutions to the cloud. Companies across the industry have embraced .NET to build top-tier AI experiences for their customers including H&R Block, Blip, and KPMG. .NET powers your favorite coding assistant, GitHub Copilot, and the brand-new Microsoft Copilot experience was rebuilt from the group up with .NET.

 

 

It is crucial that developers have access to the latest advancements when building AI services and apps. Azure, OpenAI, LlamaIndex, Qdrant, Pinecone, Milvus, AutoGen, OllamaSharp, ONNX Runtime, and many others throughout the AI ecosystem are ther to deliver a robust set of AI offerings to .NET developers.


AI Building Blocks for .NET

A robust ecosystem means there are more choices than ever for developers to decide on what is the perfect fit for their scenario. With Semantic Kernel, set of abstractions to the .NET ecosystem under Microsoft.Extensions.AI and Microsoft.Extensions.VectorData which provide a unified layer of C# abstractions for interacting with AI services, such as small and large language models (SLMs and LLMs), embeddings, vector stores, and middleware. This new streamlined approach is already seeing great results from early adopters including Pieces and OllamaSharp.

 

 

Tensors and Tokenizers

Microsoft.Extensions.AI and VectorData are only a subset of the building blocks are delivered in .NET 9 and there are great improvements to libraries and primitive types to improve AI development. Microsoft.ML.Tokenizers as improved tokenizer improvements for popular model families including GPT (4,o1,etc), Llama, Phi, and Bert in addition to new support for tokenization algorithms including Byte-Level BPE, SentencePiece, and WordPiece.

With the advent of language models as a service, the barrier to entry for developers using AI has drastically decreased. Tensor also gets a boost for AI development with a new type to represent multidimensional data to simplify interop between libraries and applying operations

 

OpenAPI enhancements in ASP.NET Core

APIs built with ASP.NET Core power services across the planet at scale, and we have continued to improve the experience of building them every single release. A highlight in .NET 9 for API developers is the new built-in support for OpenAPI document generation using the Microsoft.AspNetCore.OpenAPI package. Metadata is extracted automatically from your app code, attributes, and extension methods. The document can then be customized further with transformers that operate on operations, schemas, or the document as a whole.

 In Minimal API apps, the feature is native AOT-friendly, empowering you to optimize apps for the best performance. In addition to all of this, the OpenAPI document can be generated at build time and integrated into local development workflows and build pipelines that leverage OpenAPI tooling.

nikit photo
Nikit Nandan

Strategy Director

Nikit is experienced in conducting in-depth research to stay abreast of industry trends and emerging technologies.

Related Service

Custom Software Development

Not a one-size-fits-all solution but rather a product that is specifically crafted to meet the unique needs and specifications of the client or their business.

Read more

Newsletter

Sign up for our newsletter & Stay in the loop with our latest updates delivered right to your inbox!

Tags

Let’s build your idea!

Let us help you with free analysis & estimate. Our product expert will contact you within 12 hours.

 All your information is kept confidential and protected by NDA.