A First Look at .NET Core 2.1: Performance, Tools, and More
An overview of the major new features and improvements in .NET Core 2.1, a landmark Long-Term Support (LTS) release. We explore the massive performance gains, the introduction of global tools, and new features like SignalR.
.NET Core has been on a rapid journey of improvement, and the release of .NET Core 2.1 marks a major milestone. As a Long-Term Support (LTS) release, it provides a stable, reliable, and high-performance platform that developers can bet on for their applications for years to come.
But .NET Core 2.1 is much more than just a stability release. It's packed with incredible performance improvements and major new features that make the platform more powerful and productive than ever.
1. Unbelievable Performance Improvements
Performance has been the headline story for .NET Core 2.1. The team has made massive investments in optimizing the runtime and core libraries, and the results are staggering. Build times are significantly faster, and the runtime performance of ASP.NET Core applications has improved dramatically.
Key to these improvements are new low-level types like Span<T>
and Memory<T>
, which allow for high-performance, allocation-free manipulation of memory. While you may not use these types directly in your application code, they are used extensively throughout the framework to boost performance.
These optimizations have catapulted ASP.NET Core to the top of the TechEmpower benchmark rankings, making it one of the fastest web frameworks in the world.
2. SignalR is Back
One of the most requested features has been the return of SignalR. SignalR is a library that makes it incredibly simple to add real-time web functionality to your applications. It allows for server-side code to push content to connected clients instantly as it becomes available.
SignalR for ASP.NET Core has been completely rewritten to be faster and more scalable, and it's now a first-class part of the framework.
3. Global Tools
.NET Core 2.1 introduces Global Tools, which are special NuGet packages that contain console applications that can be installed and run from the command line. This is a powerful new way to create and distribute command-line utilities.
You can install a tool with a simple command:
dotnet tool install -g my-awesome-tool
This makes it easy to build and share your own cross-platform command-line tools with the .NET ecosystem.
4. HttpClientFactory
Making HTTP requests is a common task, but managing the lifecycle of HttpClient
instances correctly has always been tricky. HttpClientFactory
is a new feature that provides a central place for configuring and creating HttpClient
instances in your application.
It solves common problems like socket exhaustion and DNS issues by managing the underlying handlers, and it integrates seamlessly with the built-in dependency injection container.
5. HTTPS by Default
Security is a top priority, and in .NET Core 2.1, HTTPS is now enabled by default for new projects. The development certificate is automatically created and trusted, and the default project templates are configured to use HTTPS redirection, making it easier than ever to build secure applications.
A Mature and Stable Platform
.NET Core 2.1 is a landmark release. The incredible performance improvements alone make it a compelling upgrade. As an LTS release, it provides the stability and long-term support that businesses need to confidently build their applications on the platform.
With its combination of world-class performance, modern features, and cross-platform reach, .NET Core 2.1 has solidified its position as a top-tier framework for building the next generation of applications.