Please do not mix up .Net Core 2.1 and .NET Core SDK 2.1.2: The latter SDK includes the previously released .NET Core 2.0.3 Runtime and is not related to .Net Core 2.1. Confusing isn’t it?
After the scrambling genesis of .Net Core 2.0 (remember of project.json turn-around responsible for poor tooling support), the master word of 2.1 is strengthening and efficiency.
.Net Core 2.1
- Spans/Memory, recently introduced in C# 7.2, will be generalized (see technical presentation of Adam Sitnik in .NET Core: Performance Storm or this serie from Immo Landwerth: video 1, video 2 and video 3). The main goal is to reduce heap allocations :
- limit useless memory allocation (why allocate a new string with a seperate copy of data in order to read http request header when complete header is already in memory?).
- limit useless string format conversion (web is mainly utf8 whereas .Net is Unicode) but Utf8String are not supposed to be maide available in 2.1.
- favor allocation free algorithm.
- Large use of Span/Memory. From Add initial Span/Buffer-based APIs across corefx, we can see it affect large part of BCL:
- Primitive Parse methods
- System.IO.BufferStream and System.IO.ReadOnlyBufferStream
- System.IO.TextReader and System.IO.TextWriter
- System.IO.BinaryReader and System.IO.BinaryWriter
- Integration of Microsoft.Windows.Compatibility (see Ship .NET Framework compatibility pack). For a detailled description of Microsoft.Windows.Compatibility, you can see Announcing the Windows Compatibility Pack for .NET Core.
- Stacktrace improvements in .NET Core 2.1 as demonstrated by teams of Age of Ascent.
- Garbage collection customization (if the GC is less involved, it becomes possible to use more lazy algorithms). After a first clue last summer recent news suggests that Garbage collection customization will be standard in 2.1 paving the way to specific implementations (and maybe open source versions). For now, a zero GC have been demonstrated.
Asp.Net Core 2.1
- ManagedHandler : a new managed implementation to replace WinHTTP on Windows and libcurl on Unix/OSX.
- HttpClientFactory (revelead by Steve Gordon in its excelllent posts part 1 and part 2).
- A completly new SignalR version (the 2.1 milestone is not nearly as advanced as the other parts) with :
- Client based on TypeScript without jQuery dependency usable either in Node.sj or browser
- Support for multiple protocols: json, messagePack and custom (a good document details encoding and transport requirements with a sample of ProtoBuf encoding)
- Streaming from server to clients
- Ability for a client to connect through bare Websockets
EF Core 2.1
EF Core continues to recover the missing features (roadmap is here):
- GroupBy support
- Better Transaction support
- SqlGeometry, SqlGeography
- CosmoDB provider
- Improved AppInsight monitoring