Blazor also runs on the desktop in .NET 6 Preview 3

[ad_1]

Microsoft has released a third preview of .NET 6. In conjunction with the associated SDK, the company is delivering two new NuGet packages: Microsoft.AspNetCore.Components.WebView.WindowsForms and Microsoft.AspNetCore.Components.WebView.Wpf. These implement a new control element BlazorWebView for Windows Forms or Windows Presentation Foundation (WPF), which enables a Blazor-based single-page web application to be integrated into a desktop application. The Blazor application does not run in a web server or a WebAssembly VM, but in the same .NET 6 process as the desktop program; thus it has full access to all local resources of the client.

A Blazor web application in Windows Forms has full access to the file system and other resources of the Windows operating system.

The operating system requirement is currently Windows .NET 6 Preview 3 SDK and installing the WebView2 control. If this is missing, you only see the message “System cannot find the file specified” when starting the application – without any further information on the missing file. If you don’t want to use Visual Studio Code but the “big” Visual Studio, you need it Version 16.10 Preview 1.

Microsoft had already announced in September 2019 that it would also offer the .NET-based single-page web app framework Blazor as a hybrid solution in desktop applications and at that time two prototypes in connection with GitHubs Electron and as pure .NET application provided. The pure .NET application is now to become part of .NET 6 under the title “Blazor Desktop”.

Microsoft does not want to limit Blazor Desktop to Windows, but also an integration of Blazor into the cross-platform UI framework .NET .NET Multi-Platform App UI (MAUI) (see message on Preview 2) in upcoming preview versions Successor to Xamarin.Forms, deliver.

The third preview version also offers hot reloading at development time for Blazor and ASP.NET Core-based web applications. The dotnet watch tool, which completely recompiled and restarted the application when changes were made to the program code, now works incrementally and therefore faster. The condition of the components is also retained, which makes development work much more fluid.

With hot reloading, the states of the components are retained after a change to the layout and / or program code.

Developers can still use the keyboard shortcut at any time Ctrl + R Force a full restart of the web application at the console running dotnet watch. With regard to the possible changes to the code, Microsoft refers to aka.ms/dotnet/hot-reload; However, this page is not yet up to date, because not all the change options mentioned there have already been implemented.

Further improvements in .NET 6 Preview 3 mainly concern the execution speed, for example when checking and casting interfaces, handling structs and in the just-in-time compiler RyuJIT. Details are described in a Blog entry by .NET program manager Rich Lander.

ASP.NET Core 6 Preview 3 has significantly reduced the size of some JavaScript files. The Razor Compiler has been accelerated by dispensing with separate assemblies for the Razor user interfaces (Views, Pages and Components). When deploying to the IIS web server, the shadow copy procedure is now also available in ASP.NET Core that existed in classic ASP.NET; This means that binary files can also be exchanged if they are currently loaded into RAM. Daniel Roth describes further innovations in ASP.NET Core 6 Preview 3 in a separate blog post.


(ane)

To home page

[ad_2]

Share:

Facebook
Twitter
Pinterest
LinkedIn

Leave a Reply

Related Posts

Can You Snort Marijuana

Can You Snort Marijuana Simply put, snorting marijuana is not a smart or safe way to use it. Most people smoke, vape, or eat edibles

Can Marijuana Cause Diarrhea

Can Marijuana Cause Diarrhea Simply put, using marijuana can sometimes cause stomach problems like diarrhea, but it’s not completely clear if one directly causes the

Drying Marijuana in Paper Bags

Drying Marijuana in Paper Bags Key Takeaways Discover why using paper bags is advantageous for drying marijuana Learn essential steps and expert techniques for efficiently

Can You Vacuum Seal Marijuana

Can You Vacuum Seal Marijuana You can totally vacuum seal your weed, no problem. Vacuum sealing helps keep your stash fresh and potent by getting