Tech

Microsoft Build 2020: Fourth preview of .NET 5.0 and further perspectives

After three preliminary versions of .NET 5.0 appeared in March and April in a short succession with only minor innovations, the fourth preview now contains the new language compiler for C # 9.0 and for the first time F # 5.0. A new language version of Visual Basic .NET is not included and is not expected even after the announcements at the end of the further development of the language from March 2020.

Microsoft is celebrating its annual developer conference online this year. Here is the overview of the news.

In the first three previews, the .NET user community had missed the integration of Mono and Xamarin announced at Build 2019. At this year's edition of the developer conference, the software manufacturer announced that this integration to .NET 6.0 will be postponed in November 2021. Then the name "Xamarin" will be dropped. Xamarin Android becomes .NET for Android, Xamarin iOS becomes .NET for iOS and Xamarin Forms is then called the .NET Multi-Platform App UI (MAUI).

The integration of the Universal Windows Platform (UWP) apps and Unity will not be completed by the end of 2020. Overall, .NET 5.0 will not be more than the upcoming version of .NET Core. Microsoft now speaks of the ".NET 5 to 6 wave" and "Journey to a .NET". Microsoft spokesmen point to the COVID 19 crisis as the reason for the shifts. The figure shows the changed planning in a graphic, whereby according to the current status in .NET 6.0 a class library ("One .NET Base Class Library") and a software development kit ("One SDK"), but still two different runtimes ( the previous "Core" Runtime and the Mono Runtime) will exist.

The fourth preview of the object-relational mapper Entity Framework Core 5.0, which was released as part of .NET Core 5.0, contains only two innovations: Developers can now use the precision for decimal numbers in the Fluent API configuration of the context class HasPrecision() and the fill factor for SQL Server indexes with HasFillFactor() specify.

The web framework ASP.NET Core 5.0 contains Performance improvements with HTTP / 2 by using header compression with HPACK.

Microsoft has further performance improvements in tiered compilation, some string operations and regular expressions introduced. With the tiered compilation introduced in .NET Core 3.0, the just-in-timer compiler "RyuJIT" first translates the intermediate language (IL) very quickly into machine code and then later optimizes the generated machine code only for the frequently called methods in a further run . The number of method calls required for this was optimized in Preview 4.

For methods with loops you can use the environment variables COMPlus_TC_OnStackReplacement and COMPlus_TC_QuickJitForLoops to control the tiered compilation. In the .NET 5.0 era, the names actually refer to "COMPlus", the predecessor of the classic .NET framework from the last millennium.

For the definition of the target framework in the project file tag wants Microsoft implement a new concept. While a mix of "netcoreapp5.0" and "net5.0" was still visible in .NET 5.0 Preview 3, Preview 4 has been completely changed to the short spelling. The Target Framework Moniker will allow additions for the target platform in the future, for example net5.0-windows. From .NET 6.0 with the integration of Xamarin there are accordingly net6.0-ios and net6.0-android. Operating system version numbers are also possible, such as net6.0-android21. Developers can then use in the program code #if-Directively write code for individual platforms.

Platform-specific program code in .NET 5.0 / 6.0

(Picture: Microsoft)

The concept ".NET Standard" is no longer necessary in a uniform .NET. Existing DLLs based on .NET Standard should, however, according to one Scott Hunter's blog entry Run "forever" in .NET. .NET Standard 2.0 will continue to exist as a project type in Visual Studio to create shared libraries between the classic .NET Framework and .NET Core / .NET.

Microsoft originally distributed .NET Core in many individual NuGet packages, but then integrated all essential components into the setup of the .NET Framework SDK from .NET Core 2.0 for simplification. Microsoft wants for .NET 5.0 and 6.0 then break the kit, which is only called the ".NET SDK", into "Workloads"which you should then be able to install and update individually via the .NET command line work (.NET CLI / dotnet.exe).

Developers have been able to use the command since .NET Core 3.0 dotnet publish with the parameter /p:PublishSingleFile=true ensure that the executable EXE file is packed into an EXE together with all required DLLs. So far, this is nothing more than a self-extracting archive that is unpacked with a noticeable delay when it is started for the first time. In .NET 5.0, the executable should be executable directly. However, Microsoft admits that, according to the current status, complete packing into a single file will only be possible under Linux. So far, the tool creates four additional files under Windows and the development team has not yet had a technical solution to eliminate these additional files.

For .NET 5.0, Microsoft has announced that it will reduce the size of .NET in Docker containers as well as increase execution speed. The one with the preview 4 a blog entry explains the reduction.

Microsoft has specified the release date for .NET 5.0, which was previously specified as "November 2020", on November 10, 2020. On this and the following two days, the software manufacturer will again have a ".NET Conf"as a free virtual conference. Until then, monthly previews can be expected.


(ane)

. (tagsToTranslate) .Net (t) Microsoft (t) Microsoft Build