.NET 9
Episode Twenty Three
Intro
I'm Peter and this is the RoguePlanetoid Podcast where you will find insights about Microsoft or related platforms and technology, along with so much more whether you are beginner or an experienced professional or just interested in technology. Keep Current, Keep Coding!
Welcome
Welcome to episode twenty-three of the RoguePlanetoid Podcast about .NET 9. .NET 9 is the latest, most productive, modern, secure, intelligent and performant version of .NET. .NET is the free, open-source platform for building modern applications and powerful cloud services, this release focuses on performance improvements and improving developer productivity. .NET 9 is more modern and secure including simplified Blazor authentication and improved integration with cloud services.
.NET 9 also features enhanced user interface controls in Blazor, .NET MAUI, WinUI 3 used by Windows App SDK, Windows Presentation Foundation and Windows Forms along with auditing in dotnet restore for known security vulnerabilities. .NET 9 is the biggest .NET release yet including thousands of contributions from the community allowing developers to do what they do best, which is to create the applications they want on the platforms they need such as web, desktop and cloud along with AI. To find out more, to get started or to download the latest runtime or SDK for .NET 9 then visit dot.net or check out the link in the show notes.
.NET Aspire
.NET Aspire provides the building blocks to developers with a collection of tools, opinionated templates and curated packages that simplifies managing projects, resources, containers and more at development time. .NET Aspire gives developers insights during development with a streamlined inner loop including integrations that help simplify managing resources, to develop applications at scale and help get applications deployed.
.NET Aspire helps developers through every step of the development journey, get started with open-source templates, build with service discovery and use the developer dashboard with logs, metrics and traces. Developers can define the topology of their application using C# and you can run an application with a single command to get things up and running locally or deploy to the cloud, all while not having to worry about hosts or ports you just define which resources you have and what they depend on and all settings or connection details are injected automatically into applications.
.NET Aspire has useful common functionality with the .NET Aspire Community Toolkit and there is also preview support for Azure Functions. .NET Aspire is already helping teams within Microsoft develop quicker with Xbox using it to tighten their developer loop, or to aid a small team to rebuild Microsoft Copilot from scratch in just four months with a third of the code but still achieving feature parity with the previous version of Microsoft Copilot. To find out more about .NET Aspire, the set of powerful tools, templates and packages for building observable production ready apps then visit aka.ms/dotnet-aspire or check out the link in the show notes.
.NET & AI
.NET 9 helps infuse AI into applications with intelligent features such as AI tokenisers, Tensor and TensorPrimitives, support for .NET SDKs for vector databases and server-sent event parser. Intelligent applications built on .NET not only include Microsoft Copilot but other AI experiences which can take advantage of a streamlined set of unified APIs, Microsoft.Extensions.AI available in preview now, supporting common AI abstractions with standard middleware for interoperability and extensibility to make it easier to integrate AI functionality into .NET applications.
Microsoft.Extensions.AI includes Microsoft.Extensions.AI.Abstractions providing essential abstractions for integrating AI services into .NET applications and libraries. AI features are evolving with common patterns emerging such as chat, embeddings and tool calling so a set of unified abstractions are crucial for developers to work effectively across different sources, such as consuming language models either locally or remotely so regardless of provider you can seamlessly integrate using these in .NET.
Microsoft.Extensions.AI supports common abstractions for AI services along with library authors who can implement these abstractions to make their clients interoperable with the ecosystem. This allows developers to code against standard abstractions that can then pass through to specific APIs for AI services when required. Microsoft.Extensions.AI in preview currently supports implementations for OpenAI, Azure AI Inference and Ollama, but with the expectation of more being supported by package authors to support other AI services. Microsoft.Extensions.AI makes it easy to consume AI services and integrate them into .NET applications, which you can find including abstraction implementations for OpenAI, Azure AI Inference and Ollama at nuget.org/packages/Microsoft.Extensions.AI or check out the link in the show notes.
.NET MAUI
.NET MAUI is the cross-platform application framework to create .NET applications targeting Windows, iOS and Android and supports new features such as Hybrid WebView to enable reuse of components built with JavaScript frameworks such as ReactJS, Angular or Vue. .NET MAUI is an active and growing platform with a doubling of applications using .NET MAUI on the Google Play store since the release of .NET 8. .NET MAUI is an ecosystem that is growing including introduction of a free open-source toolkit from Syncfusion who have also been one of the biggest community contributors on GitHub, as Microsoft encourages every developer to contribute to .NET MAUI. To find out more about .NET Multi-platform App UI or .NET MAUI to build native cross-platform desktop and mobile applications then listen to Episode Fifteen of the RoguePlanetoid Podcast and visit dot.net/maui or check out the link in the show notes.
ASP.NET Core & Blazor
ASP.NET Core is the platform for web applications and scalable web services in .NET, delivering what developers need including providing access to back-end data with minimal APIs. .NET 9 introduces improvements to performance in ASP.NET Core with up to 15% more throughput and 93% reduction in memory usage on high-core-count machines, along with new features such as built in OpenAPI support. .NET 9 brings improvements to Blazor for building full-stack web applications in .NET, with improvements to performance with up to 25% reduction in startup time for Blazor Web Assembly along with WebSocket message compression in Blazor Server, plus precompression and improved caching for static web assets with fingerprinting to ensure the latest resources are loaded or can be aggressively cached. To find out more about ASP.NET Core then listen to Episode Twenty Two of the RoguePlanetoid Podcast and visit asp.net or to find out more about Blazor listen to Episode Six of the RoguePlanetoid Podcast and visit blazor.net or check out the links in the show notes.
C# 13
C# is the open-source programming language for building applications in .NET and with .NET 9 comes C# 13 which includes minor improvements and enhancements to make it easier to use. C# 13 includes support for IEnumerable with params to allow developers to support collection items to be passed in as arguments which can also include Span or ReadOnlySpan. Existing libraries can be enhanced with support for params such as these by adding an OverloadResolutionPriority attribute to make sure that the correct overload is used in the library, there will be more work to make sure that spans become a first-class citizen in C# 14.
C# 13 already supports partial methods which are mostly used by source generators to provide hooks for an implementation, but now you can have partial properties to create the definition of a property using the existing auto property syntax, and then create the definition of the property using existing property syntax, although due to this auto properties for just defining a partial property is not supported. Auto properties in C# 13 will finally be able to access the auto generated backing field with the new field keyword, this feature is in preview and opt-in as it is a breaking change so there will be guidance around values called field already present in many codebases, but a solution is to use this.field or @field and only when field is used on its own is this assumed to be the keyword for the backing field, developers will be able to give feedback on this experience which will be fully introduced in C# 14.
C# 13 supports a new lightweight System.Theading.Lock object which can be used with the existing lock keyword, but will have guardrails to make sure that the correct lock is being used in certain situations that developers may encounter to indicate if the incorrect lock type may be used. C# 13 also supports ref structs, use by spans, for generic scenarios where you can implement an interface but a ref struct cannot be converted an interface, this is done with the use of the allows ref struct, a so-called anti-constraint to allow ref structs to be used implicitly in methods, to enable ref structs to take part in an abstraction, which is being enabled across .NET as first-class support to allow for further functionality for ref structs in future versions of .NET. To find out more about C# then you can listen to Episode Thirteen of the RoguePlanetoid Podcast and visit csharp.net or check out the link in the show notes.
Conclusion
.NET 9 includes improvements and enhancements that .NET developers can leverage to create applications, including using .NET Aspire to make it easier to build observable, reliable, scalable and manageable applications. Developers can infuse applications with AI using Microsoft.Extensions.AI, take advantage of free open-source toolkits and community contributions to .NET MAUI, along with optimised asset handling, performance, memory management and more in ASP.NET Core and Blazor. .NET developers can also take advantage of improvements and functionality in C# 13 delivered with .NET 9. For all the announcements and sessions covering all things new in .NET 9 along with presentations from the community at .NET Conf 2024, then visit dotnetconf.net or check out the link in the show notes.
Outro
Thanks for listening to the RoguePlanetoid Podcast where each episode you will find insights about Microsoft or related platforms and technology, along with so much more wherever you listen to your podcasts or at rogueplanetoid.com/podcasts for the RoguePlanetoid Podcast whether you are a beginner or an experienced professional or just interested in technology. Keep Current, Keep Coding!
- Website - rogueplanetoid.com/podcast
- X - x.com/rogueplanetoid
- YouTube - youtube.com/@rogueplanetoid
- .NET - dot.net
- .NET Aspire - aka.ms/dotnet-aspire
- Microsoft.Extensions.AI - nuget.org/packages/Microsoft.Extensions.AI
- RoguePlanetoid Podcast - .NET MAUI - Episode Fifteen
- .NET MAUI - dot.net/maui
- RoguePlanetoid Podcast - .NET Core - Episode Twenty Two
- ASP.NET Core - asp.net
- RoguePlanetoid Podcast - Blazor - Episode Six
- Blazor - blazor.net
- RoguePlanetoid Podcast - C# - Episode Thirteen
- C# - csharp.net
- .NET Conf 2024 - dotnetconf.net
RoguePlanetoid Podcast is a production of cluarantonn.com
Hosted, Written, Produced and Edited by Peter Bull
Music based on Like a Tiger by Jo Wandrini
Production Company Name by Granny Robertson