.Net7 RC1发布
在9月14号,.Net7 RC1正式发布了。
按照微软的说法
This is the first of two release candidates (RC) for .NET 7 that are supported in production.
从RC1开始,就是生产支持了。但是大家还是要自己小心测试一番,上生产还是要谨慎谨慎再谨慎。不过你的开源项目啥的就可以放心大胆的上了。^_^
同时微软也提到,建议使用Visual Studio 2022 17.4 Preview 2,如果是mac建议用Visual Studio 2022 for Mac preview。
.NET 7 Release Candidate 1 has been tested with Visual Studio 17.4 Preview 2. We recommend you use the preview channel builds if you want to try .NET 7 with Visual Studio family products. If you’re on macOS, we recommend using the latest Visual Studio 2022 for Mac preview.
同时微软也已经说了正式版的发布日期, 2022年11月8号-10号在.Net Conf 2022上正式公布.Net7。
Don’t forget about .NET Conf 2022. Join us November 8-10, 2022 to celebrate the .NET 7 release!
.Net7的亮点
微软在博客里主要提了5点。
MAUI
.NET Multi-platform App UI (MAUI) unifies Android, iOS, macOS, and Windows APIs into a single API so you can write one app that runs natively on many platforms. .NET MAUI enables you to deliver the best app experiences designed specifically by each platform (Android, iOS, macOS, Windows, and Tizen) while enabling you to craft consistent brand experience through rich styling and graphics. Out of the box, each platform looks and behaves the way it should without any additional widgets or styling required.
就是说MAUI这个跨平台的桌面UI终于在.Net7上提供了,目前提供Android, iOS, macOS, Windows, and Tizen
平台的支持。
这里注意,目前不支持Linux,但是后面可能会支持。
另外Windows上不是传统的exe,而是商店应用程序。
云原生
Cloud native is a set of best practices for building your apps for and in the cloud to take advantage of resilience, scalability, efficiency, and velocity.
在.Net7里面我们可以通过MSBuild
来直接创建Docker镜像了,不需要在写Dockerfile,目前支持的选项还不是特别多,等后面我们可以写一点相关的内容。
Arm64
ARM provides a small form factor with exceptional performance and high-power efficiency.
每代.Net都会增加对Arm的改进,.Net7也不例外,有大量针对Arm64的改进,多到了微软都觉得这是.Net7的一大亮点了。
现代化
Being on a modern version of .NET lets you take advantage of lightning-fast performance with a plethora of new features improving your developer quality of life.
这玩意不知道咋说了,感觉说的是迁移助手的事。大概就是说让赶紧从.Net Framework迁移过来吧,迁移过来又快又稳。
性能表现
.NET is fast. .NET 7 is the fastest .NET yet. Over a thousand performance-impacting improvements went into .NET 7 impacting reflection, On Stack Replacement(OSR), start-up time, Native AOT, loop optimizations and many other areas.
惯例,每年的.Net都是迄今为止最快的.Net,所以.Net7也不例外,通过对包括OSR、Native AOT, 反射、启动时间在内的超过1000项改进来让.Net 7变成迄今为止最快的.Net了。
不过这里面还是有不少值得拿出来说一说的,比如反射据说快了一倍,Native AOT目前虽然用起来比较麻烦,使用范围也比较窄,但是至少进入主线了。