点击蓝字
关注我们
作者:David Ortinau
排版:Rani Sun
随着 .NET 8 候选版本 2(RC2)中 .NET MAUI 的发布,我们距离 .NET 8 通用版(GA)又近了一步。与 RC1 一样,此版本包含上线许可证,因此您在生产应用程序中使用它时获得支持。在此版本中,我们专注于解决在先前版本中出现的问题,并在改进了热重载、可视状态管理器、绑定和应用程序主题的可靠性的同时,恢复了一些性能。
质量改进
除了缩小对回归的关注范围之外,我们还增加了手动测试和自动化测试的覆盖率。.NET 7 和 .NET 8 之间没有重大 API 更改,因此您可以期待应用程序升级这方面顺利进行。有关从 .NET 7 升级到 .NET 8 的更多信息,请参考这个简单的指南。
指南
https://github.com/dotnet/maui/wiki/Upgrading-.NET-MAUI-from-.NET-7-to-.NET-8
此版本的亮点:
性能改进
进行了多项性能改进,包括 Android 上 ActivityExtensions.GetWindowFrame 的性能以及“Setter Specificity”性能。这些优化有助于提高应用程序的流畅性。(#17241, #17364, #17230, #17505, #17545)。
#17241
https://github.com/dotnet/maui/pull/17241
#17364
https://github.com/dotnet/maui/pull/17364
#17230
https://github.com/dotnet/maui/pull/17230
#17505
https://github.com/dotnet/maui/pull/17505
#17545
https://github.com/dotnet/maui/pull/17545
UI 和控件修复
对控件和 UI 元素进行了多项修复和更新,包括 CollectionView、TabBar 可见性、RoundRectangle 边框和 Android 文本对齐相关的修复。有了这些,您的应用程序 UI 在各个平台上更加一致和准确。(#16870、#17240、#17261、 #17353、#17430、#17594)、#17567)。
特定于平台的修复
进行了多项特定于平台的修复,包括拖放功能、选项卡栏外观和特定平台行为,确保了各个平台的用户体验一致。
(#15748, #16561, #17495, #17041, #17358)。
#15748
https://github.com/dotnet/maui/pull/15748
#16561
https://github.com/dotnet/maui/pull/16561
#17495
https://github.com/dotnet/maui/pull/17495
#17041
https://github.com/dotnet/maui/pull/17041
#17358
https://github.com/dotnet/maui/pull/17358
该版本还包括许多其他错误修复、增强功能和贡献。您可以查看完整的发行说明以了解更多详细信息。
附加信息:
.NET MAUI 发行说明
https://github.com/dotnet/maui/releases/
适用于 Android 的 .NET
https://github.com/xamarin/xamarin-android/releases/
适用于 iOS 和 Mac 的 .NET
https://github.com/xamarin/xamarin-macios/releases/
额外收获 1:.NET 7 服务版本
今天,我们还发布了适用于 .NET 7 的 .NET MAUI 服务版本 8(版本 7.0.96),包括布局、内存泄漏、CollectionView、安全区域等高优先级修复。您可以通过使用以下方法之一安装 .NET 8 RC2 并继续构建面向 .NET 7 的应用程序来使用此服务版本。
另外,您可以通过升级到 Visual Studio 17.7.5 来获取 7.0.96。
.NET MAUI 服务版本 8(版本 7.0.96)
https://github.com/dotnet/maui/releases/tag/7.0.96
额外收获 2:Xcode 15 和 Android API 34
Xamarin 开发人员现在可以使用Xcode 15 来面向最新版本(例如 iOS 17、iPadOS 17),并使用 Android API 34 以符合商店政策。为此,请安装 Visual Studio 17.8 Preview 3 或最新稳定版本的 Visual Studio for Mac,并像往常一样配置您的开发环境。这并不提供更新的平台 API,但可以让现有项目继续构建 ,而您可以在明年 Xamarin 停止支持日期之前完成升级到 .NET 8和 .NET MAUI。
最新版本
https://github.com/xamarin/xamarin-macios/releases/tag/xamarin-ios-16.4.0.18
Android API 34
https://learn.microsoft.com/en-us/xamarin/android/release-notes/13/13.2
Xamarin 停止支持日期之前
https://dotnet.microsoft.com/en-us/platform/support/policy/xamarin
如何更新
您可以在所有平台上通过 Visual Studio Code 使用 .NET MAUI 进行开发。安装 .NET MAUI 扩展并让我们知道将来如何为您改进预览体验。
请下载 .NET 8 RC2安装程序,然后通过命令行安装 .NET MAUI:
dotnet workload install maui
在 Visual Studio for Mac 明年停用后,您可以在“Preferences”中启用 .NET 8 的预览功能后继续使用 Visual Studio for Mac 进行开发。
在 Windows 上,您可以更新或安装 Visual Studio 2022 17.8 Preview 3以获取带有 .NET MAUI(7.0.96)的 .NET 8 RC2。
.NET MAUI 扩展
https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-maui
让我们知道
https://www.surveymonkey.com/r/W789CW2
.NET 8 RC2
https://dotnet.microsoft.com/en-us/download/dotnet/8.0
Visual Studio for Mac 停用
https://devblogs.microsoft.com/visualstudio/visual-studio-for-mac-retirement-announcement/
欢迎反馈
我们感谢您对 .NET MAUI 的反馈和贡献。您可以在 GitHub 存储库上报告问题、建议功能或提交请求。您还可以加入我们的 Discord 服务器或在 Twitter 上关注我们,以随时了解最新新闻和更新。
感谢所有帮助发布此版本的 23 位贡献者(包括 bot)!
报告问题
https://github.com/dotnet/maui/issues/new/choose
建议功能
https://github.com/dotnet/maui/issues/new?assignees=&labels=proposal%2Fopen%2Ct%2Fenhancement&projects=&template=feature-request.yml
提交请求
https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md