.NET 7 Preview 1 Ships
True to its word, Microsoft this week shipped .NET 7 Preview 1, the first look at the upcoming umbrella release that will finally unify all the disparate .NET dev tooling. That will enable developers to build all types of apps -- desktop, mobile, web and more -- on the same Base Class Library (BCL), runtime and compilers.
We say finally because that's what .NET 5 was supposed to do when it debuted in November 2020. However, development problems exacerbated by the COVID-19 pandemic kept that from happening, so not all the planned bits made it into .NET 5 and were postponed until .NET 6 arrived in November 2021 as a Long Term Support (LTS) release.
However, even that release didn't fully complete the unification, as some components, such as .NET Multi-platform App UI (.NET MAUI), slipped the schedule. So this year, everything should come together in on complete, integrated package.
".NET 7 builds on the foundation established by .NET 6, which includes a unified set of base libraries, runtime, and SDK, a simplified development experience, and higher developer productivity," said Jeremy Likness, senior program manager, in a Feb. 17 blog post. "Major areas of focus for .NET 7 include improved support for cloud native scenarios, tools to make it easier to upgrade legacy projects, and simplifying the developer experience by making it easier to work with containers."
Likness also addressed that slipped .NET MAUI project, which this week became mostly feature complete.
".NET MAUI is the future of cross-platform native UI with .NET and will be a part of .NET 7," he said. "On Tuesday, we released .NET MAUI Preview 13. We're currently focused on shipping .NET MAUI support for .NET 6 and we expect to ship a release candidate (RC) soon. After we have an RC available, we will focus on shipping additional RCs until we reach the quality desired for general availability (GA). After .NET MAUI GA has shipped for .NET 6, we'll include it in .NET 7 and look at improving the inner development loop experience, supporting the latest .NET SDK tooling, faster app performance, sharing more code, and an enhanced interop story. Check out the status of .NET MAUI and project roadmap for more information."
He also explained that emphasis on modern cloud development, specifically cloud-native applications, containers and microservices. Areas for improvement there include:
- Simplifying the setup and configuration necessary to implement secure authentication and authorization
- Improving the performance of application startup and runtime execution
"Containers are the preferred way to deploy cloud native apps and microservices for many companies today," Likness said. "Relying on containers presents several challenges including managing compliance, building and publishing images, securing images, and streamlining the size and performance of images. We believe that there is an opportunity to create a better experience with .NET containers."
That opportunity involves exploring the addition of SDK support to build containers directly via MSBuild, along with enhancing telemetry to improve container observability and making container images smaller, faster and more secure. Other highly requested models such as rootless and distroless are also up for exploration.
Microsoft will also continue to work on Orleans, a .NET cross-platform framework for building distributed applications that has been deemed "distributed .NET," enhancing its documentation while also making it easier to use and implement by improving integration with existing cloud services such as Azure App Services and Azure Container Apps.
Coming back down to earth, Likness noted coming improvements to the .NET Upgrade Assistant to enhance and simplify the process of modernizing apps with new features like:
- Performance gains
- Productivity features like minimal APIs and Hot Reload
- New runtime and C# language innovations
- The availability of a mature ecosystem of libraries and tools
Speaking of Hot Reload, a much-requested and long-awaited feature, improvements in Preview 1 include these edits that are now allowed in C# Hot Reload for Blazor WebAssembly and .NET for iOS and Android:
- Adding static lambdas to existing methods
- Adding lambdas that capture this to existing methods that already have at least one lambda that captures this
- Adding new static or non-virtual instance methods to existing classes
- Adding new static fields to existing classes
- Adding new classes
Known Hot Reload issues include:
- Instance fields in newly added classes are not supported
- Newly added methods and fields in existing or new classes are not visible to reflection
Other Preview 1-specific improvements affect: nullable annotations for Microsoft.Extensions; observability; CodeGen; dynamic PGO; arm64; loop optimizations; general optimizations; interop via p/Invoke code generation; new APIs in System.Text.Json; and more.
Six breaking changes, meanwhile, affect: ASP.NET Core; Core .NET libraries; serialization; and Windows Forms.
As noted earlier, .NET 6 was an LTS release with extended three-year support, but .NET 7 will be a Current release, with free support and patches available for 18 months.
More information on all of the above with many more details is available in the What's new in .NET 7 Preview 1 GitHub issue.
"A global and diverse team of engineers at Microsoft in collaboration with a highly engaged community of developers are building .NET 7," Likness said in conclusion. "The broad .NET community, including everyone from students and hobbyists to open source contributors and enterprise customers, are at the heart of .NET. They propose new ideas, contribute code regularly, and drive the .NET ecosystem forward. We appreciate and thank you for your support, contributions and insights."
David Ramel is an editor and writer for Converge360.