Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News .NET Core 2.1 Preview 2 Boasts Improved Networking

.NET Core 2.1 Preview 2 Boasts Improved Networking

Microsoft continue to work on advancing .NET Core 2.1, and the latest preview exhibits significant speed improvements, rewritten networking code based on pure .NET sockets, and general improvements to the tooling.

The dotnet tool system was unveiled in Preview 1, but has undergone some significant growth.  It is now possible to install, uninstall, and update (combined uninstall & reinstall) global tools.  A fourth option, "dotnet tool list", will list the currently installed global tools.

The Microsoft blog post announcement for .NET Core 2.1 states that there are significant build performance improvements, including:

  • Speed up package asset resolution
  • Speed up incremental package asset resolution
  • MSBuild Node Reuse
  • MSBuild ResolveAssemblyReferences Cache

High-level networking APIs in .NET Core, such as HttpClient and Kestrel are now based on a pure .NET implementation of .NET sockets.  SocketsHttpHandler is a brand-new managed HttpMessageHandler and is the default implementation for HttpClient.  Microsoft touts improved performance but also cites that it has consistent behavior across platforms.  Previous implementations had platform specific dependencies that varied whether a program was built on macOS/Linux or Windows.

Several dotnet commands have moved from a standalone package into the formal SDK.  The bundled commands are:

  • dotnet watch – runs a dotnet command when source files change (such changes can trigger compilation, test execution, deployments, etc.)
  • dotnet dev-certs  - generate certificates used with ASP.NET Core
  • dotnet user-secrets – manages application secrets used during development
  • dotnet sql-cache – used to setup distributed caching with Microsoft SQL Server
  • dotnet ef – tools to work with Entity Framework Core (manage database, dbcontext, migrations)

Installation files for .NET Core SDK 2.1.300 Preview 2 are available from Microsoft for macOS, Linux, and Windows systems, for those interested in trying out this build on their machine.  According to Microsoft’s Rich Lander, a final build of 2.1 is anticipated in the next 2-3 months.

Rate this Article