头图

We are excited to announce that Visual Studio 2022 officially supports .NET MAUI development. Now you can use .NET to build cross-platform native client applications faster and publish them to Android, iOS, macOS, and Windows from a single codebase.

This release also provides the latest stability improvements for the .NET MAUI SDK, the fifth release since the May 2022 General Availability (GA) release. You can find all release notes on GitHub .

One project, multiple platforms

.NET MAUI provides a project to handle multiple targets across devices and platforms. Any platform-specific assets are placed in subfolders so you can focus on writing the shared UI and code. The project contains a Resources folder, which makes it easy to manage your application's fonts, images, application icons, splash screens, raw assets, and styles in one place. .NET MAUI is optimized for the unique needs of each platform.

图片

visual and real-time

We've built tools to help you develop apps that don't slow down development or make you wait for your app to rebuild. Hot Reload, Live Visual Tree, and XAML Live Preview allow you to apply code changes and view them immediately, speeding up your development. Use XAML Hot Reload to make changes to the UI to instantly see real data in a running application. With .NET Hot Reload , you can make code changes, save and review those changes without losing application state.

Using XAML Live Preview, you can capture your application's UI and bring it into a docked window in Visual Studio. This makes it easier to use XAML Hot Reload to make changes to your application and see those changes in real time as you make them, especially if you don't have multiple monitors or are debugging on a device that cannot screen mirror. Just F5 debug, start editing the XAML layout, and you'll see the changes. You can also hover over each element in the XAML Live Preview window to see the specification of the control, and clicking it helps you navigate directly to the XAML.
图片
You can also use the Live Visual Tree to quickly navigate to your XAML. Click the angle brackets next to the control name in the tree and the editor will navigate to the code that defines that element.
图片

powerful editor

With AI-assisted code suggestions, your application can essentially write itself. IntelliCode provides a powerful set of automatic code completion features to understand .NET MAUI application UI and code. Start typing, and it understands your code context, variable names, functions, and the type of code you're writing, so it can provide better IntelliSense and even suggest whole-line completion. For those who are just starting to build applications, this feature can be very useful.
图片
You also get the full functionality of the Visual Studio 2022 64-bit IDE, the latest C# 10 features, and improved tools for live unit testing, source control, and team collaboration. Learn all about it on the Visual Studio team's blog .

Preview Visual Studio for Mac support

We've been working hard to get many of these awesome tools ready for our Mac developers. If you want to use .NET MAUI on Mac, please install the new Visual Studio 2022 for Mac (17.4 Preview 1) . Visual Studio 2022 for Mac will officially release .NET MAUI tooling support later this year.

Start using .NET MAUI on Windows today! Please install Visual Studio 2022 or update it to version 17.3. In the installer, select the workload ".NET Multi-platform App UI development".
图片
Note: We currently do not recommend installing .NET 7 Preview 7 if you are using Visual Studio 2022 to build .NET MAUI applications.

Regarding the release information of .NET MAUI , welcome to the blog for more resources!
image.png
Long press to identify the QR code

Click to go to the original blog~


微软技术栈
423 声望998 粉丝

微软技术生态官方平台。予力众生,成就不凡!微软致力于用技术改变世界,助力企业实现数字化转型。