Microsoft Reveals New Attributes Coming in .NET 5

eWEEK DEVELOPER RESOURCE PAGE: Twenty years have passed—an eternity in the IT world—and .NET has stood the test of time, with .NET 5 ready to be released. There are a lot of improvements in the newest version, and we list them here for you.

Download the authoritative guide: Artificial Intelligence Leaders: Top AI Vendors

.NET5logo

I remember well the scene back in June 2000, when Microsoft first launched .NET at the Marriott Marquis in New York City. I was covering the event for DevX.com; it was hot, muggy and totally uncomfortable outside, while inside developers were cool about getting their hands on the .NET platform for the first time. Many of them sat with their laptops for hours in the hotel’s conference level, trying different things and marveling at what new tools MS had wrought.

Twenty years have passed—an eternity in the IT world—and .NET has stood the test of time, with .NET 5 ready to be released next year. A lot of developmental water has gone under that bridge.

Go here to see eWEEK's Resource Page on No- and Low-Code Development.

At its .NET Conference Sept. 23, Microsoft announced the important fact that .NET 5 will have one Base Class Library containing APIs for building any type of application—a true departure from the Windows-exclusive approach of the past. Composable development tools are included. All .NET workloads, as they have been all along, are supported with application frameworks, including cross-platform web development with ASP.NET, iOS and Android mobile development with Xamarin, Windows Desktop and cross-platform IoT.

Microsoft said that .NET 5 will provide both Just-in-Time (JIT) and Ahead-of-Time (AOT) compilation models to support multiple compute and device scenarios. JIT has better performance for server and desktop workloads as well as development environments. AOT has better startup and a small footprint, and is required for mobile and IoT devices.

.NET 5 also will offer one unified toolchain supported by new SDK project types as well as a flexible deployment model (side-by-side and self-contained EXEs), and it will continue .NET Core's high performance for server and cloud workloads.

Here are more important technical facts about the upcoming version of the platform, expected to be released early in 2020.

Windows Desktop Support With WPF and Windows Forms

  • .NET Core 3.0 now supports Windows Desktop apps built with WPF and Windows Forms. Windows desktop developers can now take advantage of .NET Core platform features, including flexible framework deployments (such as elf-contained or side-by-side), better runtime performance for certain classes of APIs (such as I/O and networking), as well as all the new language features in C# 8.
  • In addition to leveraging the best that .NET has to offer, developers can more easily take advantage of the capabilities that Windows 10 has to offer. .NET Core desktop developers can use MSIX packaging technology for a streamlined app deployment. Users can also easily add Windows 10 platform APIs via NuGet to add modern experiences to existing .NET desktop applications. Users can even update an application’s UI with XAML Islands.

Full Stack C# Web Development With Blazor

  • ASP.NET Core in .NET Core 3.0 now includes the ability to build full stack web applications with C# using Blazor. Blazor builds on Razor and C# syntax so users don’t need JavaScript to build client web applications. Blazor apps are made up of composable UI components implemented using Razor syntax, a combination of HTML, CSS and C#. Blazor apps can take advantage of a rich ecosystem of UI components, including industry-leading Blazor UI component libraries from Telerik, DevExpress, Syncfusion and Radzen. Tooling for Blazor, including rich editor support, is available in both Visual Studio and Visual Studio Code.
  • .NET Core 3.0 includes support for Blazor Server apps, which handle all client-side UI interactions over a real-time SignalR connection. UI events are sent to the server, handled by the appropriate components, and then the required UI updates are applied client-side in the browser. Because most of the processing happens on the server, the download size of the app is small and it loads very quickly. Integration with the Azure SignalR Service makes it easy to scale up Blazor Server apps to thousands of concurrent users. Support for Blazor WebAssembly apps is still in preview and is expected to ship in May 2020.

New Enhancements to SignalR and Azure SignalR Service

  • ASP.NET SignalR simplifies the process of adding real-time web functionality to applications. With the release of .NET Core 3.0, Azure SignalR Service supports OnConnected and OnDisconnected event handlers via Event Grid. SignalR clients now have withAutoReconnect() method to enable automatic reconnection. Microsoft added enhanced policy support so now users can control the hub method name and individual user access. Microsoft also added client-to-server streaming support.

New C# Language Features With C# 8

  • With Nullable Reference Types, C# takes a big step toward eliminating null reference exceptions as a source of program failures. Support for Asynchronous Streams makes it easy to consume and produce real-time streams of data efficiently. Switch Expressions and Recursive Patterns allow for elegant conditional logic over the structure of objects, whereas Range Expressions simplify slicing operations on arrays, strings and spans.

Updates in Entity Framework Core 3.0 (GA Now)

  • EF Core 3.0 focuses on quality and performance as well as embracing new C# 8 language features and Cosmos DB support. EF Core’s overhauled LINQ implementation is more robust than in previous versions, allows more query patterns to be translated to SQL, generates more-efficient SQL in many common cases, and prevents inefficient queries from going undetected until applications go into production. The Cosmos DB provider builds on the new Cosmos DB SDK 3.0 to deliver a familiar EF experience to .NET developers targeting Cosmos DB’s SQL API.
  • Integration with C# 8 enables consuming database query results as asynchronous streams using await foreach and allows automatically mapping properties of non-nullable reference types to non-nullable database columns. The new interception APIs can be used to observe and extend what happens during low-level database operations, such as opening connections and executing commands. Better support for reverse engineering of existing databases allows including database views and check constraints in the generated model.  
  • Besides EF Core 3.0, the new 6.3 release of the traditional Entity Framework product makes it easier to move existing applications to .NET Core 3.0 and .NET Standard 2.1, without having to port them first to EF Core.

ML.NET (Machine Learning for .NET)

  • ML.NET is a free, cross-platform, and open source machine learning framework designed to bring the power of ML to .NET applications for a variety of scenarios, such as sentiment analysis, price prediction, recommendations and regressions. With ML.NET users can create and train their own custom ML models that adapt to your specific data and business domain scenarios.
  • The latest version ML.NET has added exciting features for .NET developers, such as the Database Loader so users can read data, while training a ML model, directly from any relational database such as SQL Server, Azure SQL DB, or your RDBMS of choice (Oracle, PostgreSQL, SQLite, MySQL, etc.).
  • Other investments currently in preview are the high-level API for Image Classification/Recognition plus Object Detection. Both features will also be very easy to use visually with Model Builder, which is a graphical UI in Visual Studio currently provided by ML.NET.
  • Because ML.NET is first and foremost a framework and supports either .NET Core or .NET Framework, users can run/consume custom ML models on any new or existing .NET application, on-premises or in the cloud.

Visual Studio 2019 Version 16.3

  • Visual Studio 2019 version 16.3 is now available, adding support for .NET Core 3.0. You can create WPF and Windows Forms desktop applications with .NET Core 3.0, alongside ASP.NET Core web and Blazor applications, gRPC services and much more. In addition, you can publish .NET Core 3.0 worker projects to Azure Container Registry, DockerHub, and elsewhere. Furthermore, v16.3 adds support for applications targeting .NET Framework 4.8 and applications written in F# 4.7. Multiple productivity improvements were added for .NET developers, among which are renaming a file when renaming an interface, enum, or class (Ctrl +R,R), and introducing local variables after writing its initializer. Lastly, mobile developers using .NET and Xamarin can now target Android Q and use XAML Hot Reload in preview.
  • Version 16.3 also adds improvements for C++ developers, including toggleable line comments, new C++ Core checks, on-by-default IntelliCode, and improved IntelliSense member list filtering. The start window also has improvements with added search in recent projects, solutions, and folders, as well as templates. The new search experience in Visual Studio 2019 (Ctrl + Q) now also enables code search for C# and VB.NET projects. There are also improvements for Python and TypeScript/JavaScript developers in this release, so be sure to check out the full release notes for all the details.

Visual Studio for Mac

  • Visual Studio 2019 for Mac version 8.3 is the latest release of Microsoft’s .NET IDE, built natively for macOS. In this release, the company has focused its efforts on four major areas in the product, starting with support for .NET Core 3.0 and C# 8. Microsoft also added significant improvements to the web editors to provide the same productivity as the editors on Windows.
  • The latest release of Visual Studio for Mac also brings support for solution-level NuGet package management. With this highly requested feature, developers can now manage project dependencies more efficiently in one place for the whole solution. In addition, Microsoft added the ability to develop libraries that multi-target various .NET frameworks, an important feature for .NET library authors.
  • Version 8.3 also includes several “delighters” across the product, such as tab pinning, selecting a target browser when running an ASP.NET Core project, nesting related files in ASP.NET Core projects and making it easier to get started with preferred keyboard shortcuts. Mobile developers using .NET and Xamarin can now target Android Q and use XAML Hot Reload in preview.

Download .NET Core 3.0 SDK: https://dot.net/get-core3

Download Visual Studio: https://visualstudio.com/download

Chris Preimesberger

Chris J. Preimesberger

Chris J. Preimesberger is Editor-in-Chief of eWEEK and responsible for all the publication's coverage. In his 15 years and more than 4,000 articles at eWEEK, he has distinguished himself in reporting...