.NET Standard 2.1 to be Released

IT giant added a lot of new features and updates to its programming platform standard
07 November 2018   1908

Microsoft developers have updated .NET Standard to version 2.1, adding to it a number of improvements and a large number of APIs. .NET Standard is a set of common interface specifications for the .NET Framework, .NET Core, Mono, Xamarin, and others. A library that meets the specifications of .NET Standard can be used on other .NET platforms.

Main updates:

  • Span data type support for all platforms. Span allows to work with strings, arrays and other types of data, and also introduces an abstraction of access to a certain section of memory for both read and write. This will simplify development. In general, Span is at the heart of most performance improvements in .NET Core 2.1.
  • Foundational-API - updated standard for performance. It, unlike Span, expands the list of program interfaces, and not data types.
  • Updated ValueTask type for high load scripts. ValueTask returns the result if the operation is performed synchronously without creating a new task, which affects the overall software performance. Using ValueTask allows to minimize the overhead of a PC or server. The type itself appeared in .NET Core 2.1, and in the new version it additionally uses such types as Socket and NetworkStream.
  • Reflection emit adds type generation technology 'on the fly'. Separately, it has already been used, but now it is included in the standard. The .NET ecosystem usually makes extensive use of dynamic functions, so Reflection emit allows to optimize system performance.
  • The previously used SIMD API is now included in .NET Standard in the NuGet package.
  • There was a primitive DbProviderFactories. It makes it easier for libraries and applications to use ADO.NET technology. The registered instance of DbProviderFactory is selected by name from the database configuration parameters.
  • Functions System.HashCode and System.String added to base class libraries.

In .NET Standard 2.1, it is planned to add about 3 thousand APIs, some of which will be simply updated, while others will be completely new. This solves the problem of sharing code for .NET developers on all platforms. Learn more at official blog.

PowerShell 7.0 to be Available

The new major version of the cross-platform automation tool and configuration framework brings a lot of changes and improvements
05 March 2020   182

Microsoft introduced the release of the PowerShell 7.0 command shell, the source code of which was opened in 2016 under the MIT license. A new shell release has been prepared not only for Windows, but also for Linux and macOS.

PowerShell is optimized to automate command line operations and provides built-in tools for processing structured data in formats such as JSON, CSV and XML, and also supports REST APIs and object models. In addition to the command shell, an object-oriented language for scripting and a set of utilities for managing modules and scripts are offered. Starting with the PowerShell 6 branch, the project has been developing using the .NET Core platform. By default, PowerShell transfers telemetry with the OS description and version of the program (to disable telemetry, you must set the environment variable POWERSHELL_TELEMETRY_OPTOUT = 1 before starting).

Among the innovations added in PowerShell 7.0:

  • Support for channel parallelization using the "ForEach-Object -Parallel" construction;
  • Conditional assignment operator "a? B: c";
  • Conditional stream start operators "||" and "&&" (for example, cmd1 && cmd2, the second command will be executed only if the first is successful);
  • Logical operators "??" and "?? =", which return the right operand if the left operand is NULL (for example, a = b ?? "default string" if b is null, the operator will return the drain with the default value).
  • Improved system for dynamic error viewing (Get-Error cmdl);
  • Layer for compatibility with modules for Windows PowerShell;
  • Automatically display notification of a new version;
  • Ability to call DSC (Desired State Configuration) resources directly from PowerShell.

Get more at the official blog and GitHub.