Previews of .NET 5, Blazor WebAssembly 3.2 Arrive

Microsoft shipped a slew of previews in advance of next month's scheduled debut of Blazor WebAssembly 3.2 and the milestone .NET 5 release planned for November.

.NET 5 is a unification of the .NET ecosystem, which has progressed from the proprietary, Windows-only .NET Framework to the current open-source, cross-platform .NET Core, now at version 3.1. In November, all things .NET will be bundled into a single platform by including Microsoft's mobile device app model (Xamarin). Thus .NET 5 will encompass ASP.NET Core, Entity Framework Core, WinForms, WPF, Xamarin and ML.NET.

Blazor WebAssembly, meanwhile, is part of the ASP.NET Core camp; it's the client-side component of Blazor, which lets .NET coders use C# for web development, long the almost exclusive domain of JavaScript. The server-side Blazor component, aptly named Blazor Server, has advanced more quickly than the client product because of problems with compiling C# code to the low-level, assembly-like WebAssembly for use in the browser.

Thus today's releases include the third preview of .NET 5 and the fifth preview of Blazor WebAssembly 3.2. Also out today is the third preview of Entity Framework Core 5.

None of the releases include any major new features. For Blazor WebAssembly, Daniel Roth, principal program manager for ASP.NET, listed the following highlights:

  • Read configuration during startup: "Configuration data is now available during app startup in Program.Main using the Configuration property on WebAssemblyHostBuilder. This property can now be used both to add configuration sources and to access the current configuration data."
  • Configure HTTP fetch request options: "HTTP requests issued from a Blazor WebAssembly app using HttpClient are handled using the browser fetch API. In this release, we've added a set of extension methods for HttpRequestMessage that configure various fetch related options."
  • Honor existing web.config when publishing: "When publishing a standalone Blazor WebAssembly app, a web.config is automatically generated for the app that handles configuring IIS appropriately. You can now specify your own web.config in the project, which will get used instead of the generated one."
  • Attach tokens to outgoing requests: "Configuring authentication now adds an AuthorizationMessageHandler as a service that can be used with HttpClient to attach access tokens to outgoing requests."

Microsoft's Sourabh Shirhatti detailed other new features for ASP.NET Core in today's .NET 5 preview, primarily performance improvements to HTTP/2. "By significantly reducing allocations in the HTTP/2 code path and adding support for HPack static compression of HTTP/2 response headers in Kestrel, the 5.0.0-prevew3 release improves the performance of HTTP/2," Shirhatti said. "We expect to announce additional features in upcoming preview releases." More information is available in the release notes.

.NET 5
[Click on image for larger view.] .NET 5 (source: Microsoft).

For .NET 5, Richard Lander, program manager for the .NET team, listed:

  • Code quality improvements in RyuJIT: "Every release includes a set of changes that improve the machine code that the JIT generates (we call this 'code quality'). Better code quality means better application performance."
  • System.Text.Json improvements: These include four different relatively minor changes.
  • .NET SDK Support for .NET Framework Assemblies: "The .NET SDK will now auto-reference the Microsoft.NETFramework.ReferenceAssemblies NuGet package given a .NET Framework target framework in a project file."

"We're continuing to work on the bigger features that will define the 5.0 release," Lander said, pointing to the release notes for more information.

New features for EF Core 5 Preview 3 as presented by senior program manager Jeremy Likness include:

  • Filtered Include: "The Include method now supports filtering of the entities included."
  • New ModelBuilder API for navigation properties: "Navigation properties are primarily configured when defining relationships. However, the new Navigation method can be used in the cases where navigation properties need additional configuration."
  • New command-line parameters for namespaces and connection strings: "Migrations and scaffolding now allow namespaces to be specified on the command line."

Other highlights concern tweaks that add extra null checking to queries and the ability for developers to now specify the partition key to use for a given query in the query itself.

More detailed information on what's new in EF Core previews is available here.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube