HomeWinBuzzer NewsMicrosoft Releases .NET 9 With New Tools for AI, Desktop Apps, Developer...

Microsoft Releases .NET 9 With New Tools for AI, Desktop Apps, Developer Productivity

.NET 9, released at .NET Conf 2024, brings major updates to WPF and WinForms, adds AI integration, and enhances developer tools for building modern applications.

-

Microsoft has officially released .NET 9 during its .NET Conf 2024 conference. The latest edition of the software development framework brings a range of new tools aimed at aligning desktop applications with modern Windows aesthetics and improving developer productivity through better integration with artificial intelligence.

AI and Expanded Developer Tools

.NET 9 extends beyond desktop applications, with significant advancements in AI integration. Collaborating with partners like OpenAI, Microsoft introduces Microsoft.Extensions.AI, making it simpler for developers to embed AI models, including popular options like GPT and Llama, directly into their applications. This integration reduces the complexity of building intelligent applications, enabling more streamlined machine learning implementations.

The AI capabilities within GitHub Copilot, now linked with .NET tools, offer developers improved assistance when writing C# code and debugging tests. Advanced features like AI-driven variable inspection enhance productivity by providing relevant context during development.

Related:

 

Bringing Fluent Design to WPF

For developers building applications with WPF, .NET 9 introduces built-in support for Windows 11’s light and dark modes. The update allows apps to automatically adapt to system settings, making them visually cohesive with current OS environments. The new Fluent theme, first previewed at Microsoft Build 2024, enhances typography, responsive layouts, and adaptive visual components, which means developers can deliver apps that look and feel current.

A subtle yet impactful change comes with improved text rendering that includes hyphen-based ligatures. This advancement improves the display of text in applications where clear and refined typography is essential.

WinForms Adapts to Modern Needs

.NET 9 brings a range of new features to WinForms, making it more adaptable for contemporary application requirements. A new dark mode detection feature allows apps to automatically adjust their UI to match the system’s theme, providing users with a seamless visual experience. While many standard UI elements now integrate with dark mode, some older components may still require manual adaptation.

The addition of Control.InvokeAsync is one of the more practical updates, streamlining asynchronous programming. The feature is particularly useful for developers who need to build applications capable of handling real-time data or frequent external API interactions without freezing the UI.

One of the persistent challenges in desktop development is ensuring that user interfaces remain consistent across various high-DPI displays. .NET 9 addresses this with a DPI-unaware design mode, maintaining a standard design surface at 96 DPI to minimize layout shifts. This addition helps developers create interfaces that look uniform regardless of screen resolution.

ASP.NET Core Improvements

.NET 9 introduces a suite of improvements to ASP.NET Core, catering to developers working on full-stack web applications and scalable backend services. The release includes notable upgrades that boost security, accessibility, and performance. One of the key enhancements is the optimization of static file handling: during the build and publish processes, ASP.NET Core generates fingerprinted versions of static assets, such as JavaScript and CSS, using content-based hashes.

This approach helps prevent outdated files from being loaded by users, facilitating aggressive caching strategies and reducing server workload thanks to pre-compressed Brotli files.

API developers gain from native OpenAPI document generation with the Microsoft.AspNetCore.OpenAPI package, which simplifies creating and customizing API documentation through automated extraction of app metadata.

The feature, optimized for AOT (ahead-of-time) compilation, makes API workflows more efficient and performance-focused. Additionally, ASP.NET Core 9.0 offers improved support for security measures, including easier HTTPS setup for development on Linux and enhanced OAuth/OIDC extensibility with support for Pushed Authorization Requests (PAR).

.NET Aspire Improvements

.NET Aspire has emerged as a critical toolset for developers seeking to create reliable, observable applications. Introduced earlier and now updated in .NET 9, Aspire brings improvements that simplify the development and deployment of cloud-based apps.

The release features an updated telemetry and metrics dashboard, along with lifecycle management tools that allow developers to start and stop resources directly from the dashboard. Additionally, the inclusion of APIs like WaitFor helps manage resource startup effectively, streamlining development cycles.

Microsoft has worked alongside the community to launch seamless integrations with popular AI and database services such as OpenAI, Ollama, and Milvus. These partnerships provide developers with flexibility when working with data-intensive or AI-powered applications. Developers can explore free learning resources on Microsoft Learn and even obtain the new .NET Aspire credential to bolster their expertise in building scalable and production-ready applications.

.NET MAUI Enhancements

.NET 9’s updates extend to .NET MAUI, reinforcing it as the go-to solution for building cross-platform applications across mobile and desktop environments. The release focuses on improved performance, reliability, and new integrations that support Android, iOS, macOS, and Windows development. Enhancements include a more efficient implementation of CollectionView and CarouselView for iOS and Mac Catalyst, resulting in better performance and lower resource usage.

Additionally, .NET 9 introduces deeper integration between Visual Studio Code and Xcode through the new Xcode Sync dotnet tool, making cross-platform development smoother.

New capabilities like the TitleBar control for Windows desktop apps and the HybridWebView control simplify the inclusion of JavaScript-enabled content, supporting frameworks such as ReactJS and Vue.js. These improvements align with Microsoft’s goal to empower developers with versatile tools that adapt to various platforms seamlessly.

C# 13 & F# 9: Enhancing Productivity and Performance

The release of C# 13 alongside .NET 9 brings several language improvements that enhance developer productivity and code efficiency. One of the standout features is the ability to use collection expressions with the params modifier, allowing more flexible method signatures that accept various collection types. C# 13 also introduces refined locking mechanisms through Lock, and a new escape sequence \e for better control over special characters in strings. These features are particularly beneficial for creating safer, high-performance code in multi-threaded environments.

F# 9, included with .NET 9, continues to deliver a robust experience for functional programming enthusiasts. The update incorporates nullable reference types for improved type safety when interacting with C# libraries, and optimized equality checks that reduce boxing, speeding up operations.

New properties for discriminated unions allow for quicker case testing, and the language now supports partial active patterns with bool returns for better flexibility in pattern matching. These changes make F# 9 more efficient for data science, game development, and general functional programming.

Accessibility Improvements and Smoother Performance

Microsoft’s focus on accessibility in .NET 9 has led to WinForms moving from the older MSAA framework to UI Automation (UIA). This shift supports better integration with assistive technologies like screen readers and aligns applications with modern accessibility standards such as the ADA. The change helps developers create more inclusive apps that reach broader audiences.

Performance improvements in .NET 9 are designed to boost efficiency, with smoother resizing and enhanced scrolling performance for data-heavy applications. These updates ensure that apps handle user interactions more effectively, which is essential for real-time data displays and resource-intensive tasks.

Open-Source Evolution and Community Contributions

Since its transition to an open-source framework with .NET Core 3.0, WinForms has seen active involvement from the development community. New capabilities such as customizable task dialogs and enhanced drag-and-drop support have emerged through community contributions. The collaboration continues to shape the framework’s evolution, allowing for ongoing improvements and increased usability.

Refined SDK and Command-Line Enhancements

The updated .NET 9 SDK brings workload sets that lock workload versions until updated, maintaining consistency across development projects. Enhanced terminal logging, which includes build summaries and clickable links, makes the command-line experience more user-friendly. Additionally, dotnet restore now includes default audits for package vulnerabilities, improving security in development workflows through integration with the GitHub Advisory Database.

Visual Studio 2022 (version 17.12) and the C# Dev Kit for Visual Studio Code come equipped with these SDK enhancements, offering expanded Git support and improved testing capabilities. The updated toolset ensures that developers have everything they need for more efficient project management and development processes.

Growing NuGet Ecosystem and Developer Engagement

.NET’s growth as a platform is reflected in its extensive NuGet ecosystem, now featuring over 420,000 packages with more than 570 billion downloads. Recent updates include NuGet.org’s dark mode option and its seamless integration with Dependabot, which streamlines dependency management.

SourceMicrosoft
Markus Kasanmascheff
Markus Kasanmascheff
Markus has been covering the tech industry for more than 15 years. He is holding a Master´s degree in International Economics and is the founder and managing editor of Winbuzzer.com.

Recent News

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
We would love to hear your opinion! Please comment below.x
()
x
Mastodon