
At Build 2024 today, Microsoft announced the release of .NET 9 Preview 4 and a sweeping set of updates and improvements across the stack. Not surprisingly, a lot of the improvements involve AI.
“.NET provides you with tools to create powerful applications with AI,” the .NET team writes in its all-up Build 2024 post. “You can use the semantic kernel to orchestrate AI plugins, allowing you to seamlessly integrate AI functionality into your applications. You can use state-of-the-art libraries like OpenAI, Qdrant, and Milvus to enhance the functionality of your applications. You can also deploy your applications to the cloud with .NET Aspire, ensuring optimal performance and scalability.”
On that note, Microsoft separately announced that its .NET Aspire cloud-native stack is now generally available for those building new cloud apps, adding cloud-native capabilities to existing apps, or deploying .NET apps to the cloud. If you’d like to know more, you can check out the team’s series of short videos and the .NET Aspire Learn Path on Microsoft Learn.
Separately, Microsoft has partnered with OpenAI to bring an OpenAI SDK for .NET that supports the latest OpenAI features and models, including GPT4o and Assistants v2, and provides a unified experience across OpenAI and Azure OpenAI. The SDK will ship later this month.
And .NET 9 will include a new Tensor<T> data type to address the cornerstone data structure used by AI, a sort of multidimensional array that represents data as tokens (text sequences)), images, video, and audio. This makes it easier to write code that interoperates with AI libraries like ML.NET, TorchSharp, and ONNX Runtime, and it provides efficient math, indexing, and slicing operations.
.NET developers who wish to get started with AI quickly can check out the team’s AI samples on GitHub, with quick starts across the semantic kernel, Azure OpenAI SDK, vector databases, LLM core concepts, local models, and more.
Moving past AI, Microsoft is building on its work bringing .NET to Linux by adding a new server garbage collector mode in .NET 9 that dramatically reduces memory usage and many low-level optimizations and improvements that speed .NET across the board. The C# language is being updated to version 13 with new features for the params keyword that let it work with any of the types currently supported by collection expressions (as opposed to just arrays), new extension types with methods, properties, and other members, and other improvements.
For web developers, .NET provides ASP.NET Core for building modern, browser-based web apps and backend services, and Blazor for building web user interfaces for ASP.NET Core apps. With .NET 9, ASP.NET Core will add a HybridCache API for distributed caching. And Blazor now support constructor injection, WebSocket compression, and new rendering capabilities.
.NET MAUI helps developers create cross-platform apps that run across Windows, Mac, Android, and iOS, and with .NET 9, Microsoft is updating its .NET MAUI extension for Visual Studio Code (in preview) with support for XAML Intellisense, Xcode Sync, and other improvements based on feedback. There are also new features like iOS library multi-targeting, Android Asset Packs, and experimental Native AOT support for iOS and Mac Catalyst apps. Finally, Microsoft will make it easier to write .NET MAUI hybrid apps with a new solution template for creating a UI that will be shared between Blazor hybrid and web apps, and a new HybridWebView control to enable JavaScript frameworks.
There’s a lot going on, basically. You can learn more about .NET 9 on GitHub. And you can download .NET 9 Preview 4 from the .NET website.