Paul Krill
Editor at Large

.Net Standard 2.1 roadmap: The new features you can expect

news
Nov 9, 20182 mins

Thousands of APIs will be added, including the Span<T> type to represent memory

1 network internet connected grid earth power satellite view
Credit: Getty Images

.Net Standard 2.1, the next version of a set of standard APIs for all .Net implementations, will add about 3,000 APIs. The .Net Standard specification has been an attempt to prevent fragmentation of .Net and to provide for code-sharing. 

While the definition of Version 2.1 remains a work in progress, Microsoft revealed that many of the planned APIs are new while others were existing ones were added to help further converge .Net implementations.

Highlighting .Net Standard Version 2.1 is the addition of Span<T>, which is considered critical to most performance improvements in .Net Core 2.1. Span<T> provides an array-like type to represent managed and unmanaged memory in a uniform way. Also, it supports slicing without copying and enables more efficient management of buffers.

Other capabilities in .Net Standard 2.1 include:

  • SIMD (single instruction, multiple data), which has been supported in .Net Core and .Net Framework. It has been used to speed operations in the BCL (base class library), such as string comparisons. There have been requests to expose these APIs in .Net Standard, because the functionality requires runtime support and cannot be meaningfully provided as a NuGet package.
  • Foundational-APIs that work with spans.
  • DbProviderFactory, which lets libraries and applications use a specific ADO.Net provider without knowing its specific types at compile time, by selecting among DbProviderFactory instances based on a name that can be read from configuration settings, for example.
  • Reflection emit, a dynamic feature in the .Net ecosystem intended to boost productivity. It is included along with lightweight code generation. Attempts had been made to include it as a NuGet package but this core technology could not be modeled via a package.

.Net Core 3.0 and upcoming versions of Mono, Xamarin, and Unity will be updated to .Net Standard 2.1. Microsoft said many API additions in .Net Standard 2.1 need runtime changes to be meaningful, so .Net Framework 4.8 will stay on .Net Standard 2.0. Also, library authors who need to .Net Framework customers are advised to stay with .Net Standard 2.0, because the API additions are largely for advanced scenarios. But library authors can take advantage of APIs by using multitargeting to compile for both .Net Standard Version 2.0 and .Net Standard Version2.1.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author