Microsoft offers .NET 5 taster

.NET 5

Microsoft’s .NET team has pushed out previews for .NET 5 and Entity Framework Core 5.0, looking for feedback on a variety of changes meant to unify the associated portfolio.

The final .NET 5 release is meant to unify the .NET SDK experience by providing a single base class library for all .NET applications and integrate mobile development better. The .NET team also aims at offering devs support in building high performance, single file apps and multiple projects for local and cloud usage, as well as native and web applications that run on a variety of platforms.

If you’re wondering about the version number, .NET Core is on v3.1 after all, this is meant to “make clear that .NET 5 is the future of .NET, which is a single unified platform for building any type of application”. And while “.NET Core and then .NET 5 is the .NET you should build all your NEW applications with” the team is quick to remind users that the framework is going to be “supported as long as Windows itself is supported”, so keeping older .NET apps should remain safe.

In its first preview, .NET 5 mainly delivers on what Director Program Management, .NET, Scott Hunter calls continuous improvements. It for example includes throughput improving changes in the regular expressions engine and a couple of optimisations in RyuJIT. The latter boil down to the tool observing more patterns where null checks are unnecessary, collapsing duplicate expressions that only need to be evaluated once, and doing key optimisations earlier in the workflow.

Advertisement

However, the .NET team also went on to enhance some features, the event pipe subsystem and API being one example. It now enables profilers to write event pipe events, and comes fitted with assembly load information, which is meant to help in making similar diagnostics functions available across .NET. 

Among the unification steps already taken at this stage is the consolidation of the .NET GitHub repositories. To get the number of primary repos down, the team has recently merged dotnet/corefx, dotnet/coreclr, and dotnet/core-setup into dotnet/runtime, dotnet/sdk and dotnet/cli into dotnet/sdk, and a number of aspnet org repositories into dotnet/aspnetcore.

Meanwhile work on the next version of Entity Framework (EF) Core hasn’t stopped and a preview of its version 5.0, which is to be included in the .NET 5 release, is now accessible as well.

Highlights of the release include a LogTo method that replaces Database.Log in an effort to “provide a simple way to get logs from EF Core without the need to configure any kind of external logging framework”. Entity Framework Core is now also able to generate change-tracking runtime proxies. To help debugging, it comes with a reworked model view and a debug one for tracked entities in the state manager.

Other new additions include a KeylessAttribute for configuring entity types without keys, and the ToQueryString extension method, which returns the SQL EF Core generates when executing a LINQ query. More details on the preview can be found in the accompanying blog entry.

- Advertisement -