.Net7 內容匯總(1)
.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目前雖然用起來比較麻煩,使用範圍也比較窄,但是至少進入主線了。