Microsoft has previewed Visual Studio 2022 17.12 with numerous new features including full support for .NET 9, which has also been updated with a focus on Blazor and MAUI (Multi-platform App UI).
This is the first preview of Visual Studio to have full .NET 9 support, though .NET 9 is also in preview. The usual release cycle for .NET is a major release in November, matched with an update to Visual Studio. This year is it .NET 9, which as an odd-numbered release will be supported for only 18 months.
New features in .NET 9 include C# 13, as well as improvements to frameworks such as ASP.NET Core (including Blazor), .NET Aspire for targeting Kubernetes, and .NET MAUI for cross-platform.
MAUI appears to be getting a lot of attention from Microsoft, after an uncertain start when many developers declared it not ready. New in this preview is a control called HybridWebView, which not only displays arbitrary local web content but also enables communication between the content in the WebView and C# in the .NET application. Web content and scripts go in a Resources section of the application. Microsoft suggests, for example, that developers might host a React JavaScript application in MAUI and build a back-end for it in C#, all running locally on the device and publishable to app stores.
There is also a new solution template that creates hybrid applications using Blazor for a web application and MAUI to run the same code for desktop and mobile applications.
Apart from .NET 9, the new preview also has enhanced code search, with the ability to dock the new code search window, as well as a new “go to line” option with visual preview, though note that Ctrl-G in the editor still works as a simpler method.
Creating a new GitHub repository from within Visual Studio now supports internal (private) repositories, following feedback that users were sometimes creating public repositories by mistake, with potential consequences such as leaking sensitive information.
The full Visual Studio preview release notes are here, and for .NET 9 preview 7, here .
Is Microsoft delivering what developers are asking for? It is to some extent, but the company is selective. Aside from an in-vain appeal for a Linux version, the biggest outstanding user requests for Visual Studio are native Rust support, and a visual designer for WinUI 3.
Rust support was requested in 2019 and is officially under review though after five years there is no sign of Microsoft meeting the request. Rust is well supported in Visual Studio Code, where the rust-analyzer extension has more than 3.5 million downloads.
A WinUI 3 visual designer is potentially a higher priority for Visual Studio. This request is also under review, as it has been since June 2022, despite developers frequently citing this as a key reason for slow adoption of the framework. Microsoft still describes WinUI as “the premiere native user interface framework for Windows desktop apps,” though the company’s language on this topic has softened recently, with WPF (Windows Presentation Foundation) getting a surprising recommendation at the Build event in May. That said, the focus on MAUI in the latest update perhaps suggests that this cross-platform is a higher priority than reinvigorating WinUI 3 with a visual designer.