Announcing ASP.NET Core Updates in .NET 5 Preview 8

CL
Concetto Labs
  • Date Published
  • Categories Blog
  • Reading Time 6-Minute Read

If you’re looking for ASP.Net Development company, then connect with us as we have expert ASP net framework 5 coders who’ll support in your project.

Developers are now ready to use .NET 5 preview 8. We know .Net 5.0 comes with entirely new features. It’s estimated that preview 8 is the last. The team is planning to release a go-live candidate before the final .Net 5.0 release in November. If anyone is looking to download .Net 5.0 for windows, Linux, and macOS, then use below links to download: (Source: https://devblogs.microsoft.com/)

  • Installers and binaries contained images
  • Snap installer
  • Release notes
  • Known issues
  • GitHub issue tracker


Moving on with ASP.Net core updates then the release adds:

  • Azure Active Directory authentication using Microsoft.Identity.Web
  • Update Blazor WebAssembly globalization support
  • CSS isolation for blazer components
  • Set UI focus on blazer components
  • Add new InputRadio blazer components.
  • Get influence by HTML5 head in blazer apps.
  • Add lazy loading in blazer WebAssembly
  • Control Blazor components instantiation
  • Can model binding and validation with C# record types
  • Continuous improvement to DynamicRouteValueTransformer
  • Protected browser storage

How to get started

Before you get started with .Net framework 5, you need to install .Net 5 SDK which will add Visual Studio 2019 16.8 with preview 3. You can also use a newer version .Net 5 RC1 or else install the latest version of the C# extension. .Net 5.0 comes with several improvements, smaller container images with JsonSerializer APIs, nullable reference type annotations, and support for Windows ARM64.

Here ARM64 is the leading key performer and offers better throughput with smaller binaries. Moreover, it includes language versions like C#9 and F# 5.0. With using .Net 5.0, one can get Web Assembly support, use mono runtime and mono libraries. .Net platform comes with higher compatibility between various .Net app types and helps in improving one codebase. The .Net library comes with down payment vision which helps in delivering large focused Xamarin with .Net 6.0.

Upgrade an existing project

If you’re looking for an upgrade, then hire ASP.NET Development Company and upgrade your existing project. To upgrade Asp Net core app from .Net 5 previews 7 to .Net 5 Preview 8 then check the below links:

Update System.Net.Http.Json package to 5.0.0 – preview.8.*.
Update Microsoft.ASPNetCore. *package references to 5.0.0- preview.8.*.
Update Microsoft.Extentions. *package references to 5.0.0-preview.8.*.

What’s new in.Net 5?

Let’s understand in-depth for .Net 5 previews 8 updated features
Azure Active Directory authentication with Microsoft.Identity.Web

It’s one of the templates by ASP.Net core which integrates with Microsoft.Identity.Web and handle authentication with Azure Activity Directory. The package offers excellent user experience as well as an easier way to access Azure resources on behalf of users.

CSS isolation from Blazor Components

Blazor defines CSS styles that have scope to given components. Several components offer a CSS style, which makes a reason to style your app and avoid unintentional side effects. One can define styles in a.razor.css file which matches the name of. Razor file for the components. Blazor achieves CSS isolation by rewriting CSS selectors and match markup by components. Blazor doesn’t support CSS preprocessors such as Sass which is used to generate components-specific style.

Lazy Loading in Blazor Web Assembly

It’s a feature of .Net 5 previews 8 which enables us to improve the load time of Blazor WebAssembly by deferring the download of specific app dependencies and used for particular parts of the app. For app delay, you can add it to BlazorWebAssemblyLazyLoad assemblies are being marked at runtime and used the page loader services for specific pages.

Updated Blazor Web Assembly Globalization Support

.Net 5 previews 8 has reintroduced globalization support for Blazor WebAssembly based on ICU (International Components for Unicode). As a part of the introducing ICU data, we’ll find logic for optimizing these payloads for any required download size. The work isn’t completed yet, and the team is expected to reduce the size of ICU data shortly.

Set UI focus n Blazor Apps

Blazor does come with the FocusAsync convenience method, which sets for UI focus on those elements.

Control Blazor Components Instantiation

Now you can control Blazor components that provide your own IComponentActivator Service implementation.

HTML head in Blazor Apps

Using the HTML head one can use new Title, Link, and Meta components which program dynamically with adding links and meta tags to the HTML head in a Blazor App. We can add package reference for example Microsoft.ASPNetCore.Components.Web.Extensions package and add a directive for it.

Protected Browser Storage

In Blazor server apps, Blazor in .Net 5 helps in solving a problem that helps in offering two primary services such as protectedlocalstorage and protectedsessionstorage. The services will help in providing local and session storage, respectively. You have to make sure that your data is stored safely and uses ASP.NET core data protection APIs.

Model Binding and Validation with C# 9 record types

One can use C# 9 record types with model binding in MVC controller or Record type. Here Record type provides a great way to model data that is being transmitted over the wire.

DynamicRouteValueTransformer Improvements

In .Net core 3.1, ASP.Net introduces DynamicRouteValueTransformer which uses a custom endpoint and dynamically select MVC controller as an MVC action controller. One can pass state to DynamicRouteValueTransformer and filter the set to various endpoints selected.

Also Read: Announcing .NET 5 Preview 6: ASP.Net Core Feature Updates

Console Logger Formatter

We’ve improved the console log provider that we have in Microsoft.Extensions.Logging library. The developer implements custom consoleformater and exercises complete control over formatting and colorization. Their console logger can parse escape sequence on unsupported terminals and allows a single formatter to the author for all various terminals.

JSON Console Logger

JSON support custom formatters and adds a built-in JSON formatter which emits structured JSON logs to the console. Switch on from default simpler logger to JSON and experience better. You can hire a dedicated asp.net developer and upgrade your existing project.

Wrap up

Hope the above release ASP Net core Development in .Net 5 previews 8 updates found useful to you. With this new update, you can pass your state, filter your set of endpoints chosen and launch in browser with making appropriate code changes to it. If you’re looking for ASP.Net Development company, then connect with us as we have expert ASP net framework 5 coders who’ll support in your project. For additional preview 8 update, visit the official blog post.