First .NET 6 Preview Introduces Blazor Desktop – Visual Studio Magazine

News
Microsoft shipped the first preview of .NET 6, expected to debut in November as the culmination of a years-long effort to provide an open source, cross-platform framework for all things .NET in one unifying umbrella offering.
That effort to transform the old, Windows-only .NET Framework to a modern product started with .NET Core and moved on to .NET 5, which was supposed to unify .NET with a November 2020 debut but which failed due to the pandemic and other issues. So .NET 6 will complete that effort with the capability to create apps for desktop, web, cloud, mobile, gaming, IoT, AI and more running on Windows, Linux, Android, iOS, Mac/Mac Catalyst, Windows Arm64, iOS/tvOS and more. It does that by bringing formerly disparate components like Xamarin under the umbrella (hence the iOS/Android/macOS functionality).
“A big change this release is fully integrating Android and iOS as part of the existing Xamarin workloads,” said Microsoft’s Richard Lander. “That requires the obvious requirement to integrating a bunch of code, build systems, and other technology. It also requires integrating blogs, docs, and samples. While we’ve worked with the Xamarin team for many years, we welcome all of our Xamarin friends to the .NET 6 project. We also welcome Xamarin users to being a part of .NET 6.”
In .NET 6, the dev team will specifically focus on app performance, adding new control themes, and faster developer experiences, Lander said.
.NET 6 Preview 1 begins to tackle those goals with a host of new features and grand plans, including introducing Blazor desktop, an offshoot of Microsoft’s red-hot ASP.NET Core component that allows for C# web development instead of JavaScript through the use of WebAssembly.
We recently mentioned the mysterious Blazor desktop effort in a roundup of the dizzying array of desktop dev options that Microsoft now provides, including WPF, WinForms, UWP, .NET MAUI, Win UI, Project Reunion and so on, even though little was known about it.
Now we know more.
“We first supported Blazor on the server, then in the browser with WebAssembly, and now we’re extending it again, to enable you to write Blazor desktop apps,” said Lander in announcing the new Preview 1 on Feb. 17. “Blazor desktop enables you to create hybrid client apps, which combine web and native UI together in a native client application. It is primarily targeted at web developers that want provide rich client and offline experiences for their users.”
That effort stems from an Oct. 26, 2020, GitHub issue (#27217) titled “Epic: Blazor developers can target and deploy their applications to desktop platforms, allowing them to run natively.”
“Blazor desktop offers a lot of choice on how you construct your application,” Lander said. “At one end of the application spectrum, you can use Blazor and web technologies for all aspects of the client application experience with the exception of the outer-most native application container (like the title bar). On the other end of the spectrum, you can use Blazor desktop for targeted functionality within an otherwise native app (like WPF), like a user profile page that you’ve already implemented for your Blazor-based website. All the choices in between are equally possible. We are building Blazor desktop initially for .NET apps, but there is no technical reason why you couldn’t use it in a desktop app built with another app stack, like for example Swift.
“Blazor is built on top of .NET Multi-platform App UI. It relies on that UI stack for a native application container and native controls (should you want to use them). We are building Blazor to have startup and throughput performance on par with other desktop solutions. For developers that love Blazor and love web technologies, we think that Blazor is going to be a great choice for building desktop apps.”
The term “epic” in the above GitHub issue is used in Microsoft’s Themes of .NET site, where the company tracks the development of .NET 6 in a formal structure that categorizes initiatives as themes, user stories, issues and epics, the latter described as “a higher level grouping of related user stories, it can span up to the entire release. For example ‘Enterprises have a first class experience acquiring and deploying .NET 6.0′”
Microsoft points to that site for developers to keep informed about .NET 6 because the dev team is now using GitHub issues to plan the product release instead of Azure DevOps, which was used to plan for .NET 5.
Lander’s huge, finely detailed post also covers other parts of .NET 6 in addition to Blazor desktop and .NET MAUI, including:
As far was what’s new in .NET 6 Preview 1, that’s all conveniently presented in a GitHub issue appropriately titled “What’s new in .NET 6 Preview 1.” Some highlights there include:
“.NET 6 promises to be another exciting release with many compelling improvements,” Lander said in his conclusion. “It is a particularly interesting release because it contains changes as a result of needing to adapt to externally focused operating system evolution, and also continuing to innovate within the .NET platform itself. It is also the continuation of increased openness from the .NET team, both in terms of open planning but also sharing previously proprietary performance tools. We haven’t achieved it just yet, but .NET 6 will be the second November release in a row, in our new annual cadence. Given the success of shipping .NET 5 in November 2020, in a very challenging environment, there is every reason to expect .NET 6 will also be released on time.”
.NET 6 has been tested with Visual Studio 16.9 Preview 4 and Visual Studio for Mac 8.9 and Microsoft recommends using those builds to try .NET 6. Preview 1 can be downloaded here.
Microsoft also announced Entity Framework Core 6.0 Preview 1 and highlighted ASP.NET Core updates in .NET 6 Preview 1.
About the Author
David Ramel is an editor and writer for Converge360.

Printable Format
As promised, Microsoft is previewing a .NET MAUI Community Toolkit some two months before it begins to sunset its progenitor, Xamarin.Forms, long used for mobile iOS and Android app development with C# and XAML.
Hundreds of developers expressed amazement at a new preview feature introduced this month by GitHub: the ability to instantly open up Visual Studio Code in a browser in order to edit the source code found in any repository.
“The last thing we want is for devs to be distracted or frustrated and if people don’t find this helpful, we won’t continue it.”
TypeScript, Microsoft’s type-optional take on JavaScript, has shipped in version 4.4, along with receiving a home page revamp.
“Developers should remain vigilant (‘awake’) when using Copilot as a co-pilot.”
> More Webcasts
Problems? Questions? Feedback? E-mail us.

source

Leave a comment

Your email address will not be published. Required fields are marked *