Press "Enter" to skip to content

Ready for production: First release candidate for .NET 6

After a total of seven previews, the version released yesterday is the first of two release candidate publications of .NET 6. It not only stabilizes some functions that have already been published, such as hot reloading, but also offers numerous new functions for web developers.

While .NET 6 including ASP.NET Core 6.0 and Entity Framework Core 6.0 in the RC1 version receive a “go-live” license from Microsoft, which entitles them to productive use, the development of cross-platform applications is possible with .NET Multi-platform app UI (.NET MAUI) for Android, iOS, macOS and Windows are expressly excluded. Scott Hunter explains in a blog postthat the announced .NET 6 release date on November 9, 2021 will not be fully completed and therefore the appearance of this type of application has been postponed to the second quarter of 2022. After all, the installation of .NET MAUI is now possible directly via Visual Studio 2022, which appeared in parallel as Preview 4. With Live Preview, developers can see the current application status.

Live preview of a MAUI application in Visual Studio 2022.

With the Blazor 6.0 web framework contained in .NET 6, the RC1 version focuses on extended interoperability scenarios between C # and JavaScript. To integrate Blazor into existing JavaScript applications, it is now possible to render individual Blazor components from JavaScript code. An example on GitHub is based on this the use of Blazor in Angular- and React-based single page apps. Microsoft is also working on making Blazor components available as standard web components. The NuGet package Microsoft.AspNetCore.Components.CustomElements available for creating HTML Custom Elements is only in the experimental alpha stage.

Using the JavaScript Initializer, a developer can now execute JavaScript code before and after loading Blazor applications and Razor Class Libraries. After the fast data streaming from JavaScript to C # was provided in Preview 7, RC1 now also offers the reverse route from C # to JavaScript with the .NET class DotNetStreamReference; in JavaScript the data goes as Array Buffer or Readable Stream a. JavaScript files, which previously always had to be in the wwwroot folder, can be assigned directly to Razor files in Blazor 6 by receiving the file name extension .razor.js or .cshtml.js.

The class NavigationManager supported with GetUriWithQueryParameter() and GetUriWithQueryParameters() two new methods for editing query strings. In the event parameter type MouseEventArgs there are now the values PageX and PageY.

As an alternative to web sockets, continuous browser-server communication has also been possible via HTTP long polling with Blazor Server since the first version. Microsoft has Disabled the automatic fallback to this strategy in Blazor Server 6.0so that long polling is not accidentally used. For Blazor WebAssembly, whose DLL loading processes were previously blocked by some firewalls and security applications, Blazor 6.0 now offers a customizable loading process. According to the blog entry, Microsoft wants to reveal details about this soon.

A number of improvements for OpenAPI, parameter binding and error handling for the new, simplified WebAPI programming are already mentioned in the current announcement. Setting up HTTP / 3 is also easier.

Microsoft’s ORM mapper Entity Framework Core now supports RC1 in version 6 temporal database tablesthat save the history of the values ​​in data records. A temporal table is defined with the addition IsTemporal() in the Fluent API. The query is then made with the new operators TemporalAsOf(), TemporalAll(), TemporalBetween(), TemporalFromTo() and TemporalContainedIn(). Temporal table support applies to all relational databases. Microsoft itself offers the feature for its SQL Server. Other database manufacturers can build it into their drivers.

Judge on November 23, 2021 heise Developer and dpunkt.verlag in co-operation with With betterCode () .NET 6, an online conference on the upcoming LTS (Long-Term Support) release from Microsoft’s .NET development platform. It should appear in November and is the new basis for all programs based on Microsoft’s development platform – whether desktop applications with Windows Forms and WPF, web applications with ASP.NET, mobile apps based on Universal Windows Platform and .NET MAUI or Unity games . Tickets and further information about the program of the betterCode () .NET 6 offers the conference website.

When reverse engineering databases with pure N: M intermediate tables, the PowerShell commandlet generates Scaffold-DbContext no more classes for the intermediate tables and instead builds two direct relationships ICollection<T>. The feature has basically been around since version 5.0, but it has not yet been used in reverse engineering. Again, the development team has some planned functions like the support of JSON column types was removed.

at the implicit namespaces, which Preview 7 had automatically imported into all .NET 6 projects via Global Using (a C # 10 feature), Microsoft is making a U-turn. This automatism led to problems when updating program code that used classes with the same name in other namespaces. As of RC1, the implicit namespaces are only active if in the .csproj project file in a <PropertyGroup> explicitly that day <ImplicitUsings>enable</ImplicitUsings> occurs. This is only the case with .NET 6 in Visual Studio 2022 newly created C # projects; older projects that are upgraded to .NET 6 will not receive the tag. In new projects, C # developers can edit the implicit namespaces by deleting the tag or with <ImplicitUsings>disable</ImplicitUsings> deactivate. Alternatively, you can also use individual namespaces in a <ItemGroup> with <Using Remove="Namensraum"> deactivate.


Article Source

Disclaimer: This article is generated from the feed and not edited by our team.