Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

.NET announcements: Preview 2 of .NET Core 2.2 and Entity Framework Core 2.2, C# 7.3, and ML.NET 0.5

Save for later
  • 5 min read
  • 13 Sep 2018

article-image

Yesterday, the .NET community announced the second preview of .NET Core 2.2 and the Entity Framework 2.2. They also released C# version 7.3 and ML.NET 0.5.

Let’s have a look at the highlights and features of each of these announcements.

.NET Core 2.2 Preview 2


.NET Core 2.2 Preview 2 can be used with Visual Studio 15.8, Visual Studio for Mac and Visual Studio Code. Following are two highlights of this release.

Tiered Compilation Enabled


The tiered compilation is enabled by default. The tiered compilation was available as part of the .NET Core 2.1 release. During that time, one had to enable tiered compilation via application configuration or an environment variable. It is now enabled by default and can be disabled, as needed.

In the image below, the baseline is .NET Core 2.1 RTM, running in a default configuration, with tiered compilation disabled. The second scenario has tiered compilation. One can see a significant request-per-second (RPS) throughput benefit with tiered compilation enabled.

net-announcements-preview-2-of-net-core-2-2-and-entity-framework-core-2-2-c-7-3-and-ml-net-0-5-img-0

The numbers in the chart are scaled so that baseline always measures 1.0. Such an approach makes it very easy to calculate performance changes as a percentage. The first two tests are TechEmpower benchmarks and the last one is Music Store, a frequent sample ASP.NET app.

Platform Support


.NET Core 2.2 is supported on the following operating systems:

  • Windows Client: 7, 8.1, 10 (1607+)
  • Windows Server: 2008 R2 SP1+
  • macOS: 10.12+
  • RHEL: 6+
  • Fedora: 27+
  • Ubuntu: 14.04+
  • Debian: 8+
  • SLES: 12+
  • openSUSE: 42.3+
  • Alpine: 3.7+


Read about the .NET Core 2.2 Preview 2 in detail, on Microsoft blog.

Entity Framework Core 2.2 Preview 2


This preview includes a large number of bug fixes and two additional important previews, one is a data provider for Cosmos DB and the second one, new spatial extensions for .NET’s  SQL Server and in-memory providers.

New EF Core provider for Cosmos DB


This new provider enables developers (familiar with the EF programming model) to easily target Azure Cosmos DB as an application database. It also includes global distribution, elastic scalability, ‘always on’ availability, very low latency, and automatic indexing.

Spatial extensions for SQL Server and in-memory


This implementation picks the NetTopologySuite library that the PostgreSQL provider uses as the source of spatial .NET types. NetTopologySuite is a database-agnostic spatial library that implements standard spatial functionality using .NET idioms like properties and indexers.

The extension then adds the ability to map and convert instances of these types to the column types supported by the underlying database, and usage of methods defined on these types in LINQ queries, to SQL functions supported by the underlying database.

Read more about the Entity Framework Core 2.2 Preview 2 on the Microsoft blog.

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime

C# 7.3


C# 7.3 is the newest point release in the 7.0 family. Along with new compiler options, there are two main themes to the C# 7.3 release

  • One provides features that enable safe code to be as performant as unsafe code.
  • The second provides incremental improvements to existing features.


New features that support the theme of better performance for safe code:

  • Access to fixed fields without pinning.
  • Easy Reassign ref local variables.
  • Use of initializers on stackalloc arrays.
  • Easy use of fixed statements with any type that supports a pattern.
  • One can use additional generic constraints.


The new compiler options in C# 7.3 are:

  • -publicsign to enable Open Source Software (OSS) signing of assemblies.
  • -pathmap to provide a mapping for source directories.


Read more about the C# 7.3 in detail in its documentation notes.

ML.NET 0.5


The .NET community released ML.NET version 0.5. ML.NET is a cross-platform, open source machine learning framework for .NET developers.

This version release includes two key highlights:

Addition of a TensorFlow model scoring transform (TensorFlowTransform)


Starting from this version, the community plans to add support for Deep Learning in ML.NET. Following this, they introduced the TensorFlowTransform which enables taking an existing TensorFlow model, either trained by the user or downloaded from somewhere else, and get the scores from the TensorFlow model in ML.NET.

This new TensorFlow scoring capability doesn’t require one to have a working knowledge of TensorFlow internal details. The implementation of this transform is based on code from TensorFlowSharp.

net-announcements-preview-2-of-net-core-2-2-and-entity-framework-core-2-2-c-7-3-and-ml-net-0-5-img-1

One can simply add a reference to the ML.NET NuGet packages in thier .NET Core or .NET Framework apps. Under the covers, ML.NET includes and references the native TensorFlow library which allows writing code that loads an existing trained TensorFlow model file for scoring.

New ML.NET API proposal exploration


The new ML.NET API offers more flexible capabilities than what the current LearningPipeline API offers. The LearningPipeline API will be deprecated when this new API is ready.

The new ML.NET API offers attractive features which aren’t possible with the current LearningPipeline API. These include:

Strongly-typed API  takes advantage of C# capabilities. This helps errors to be discovered in compilation time along with improved Intellisense in the editors.

Better flexibility: This new API provides a decomposable train and predict process, eliminating rigid and linear pipeline execution.

Improved usability: This new API makes direct call to the APIs from user’s code. No more scaffolding or insolation layer creating an obscure separation between what the user/developer writes and the internal APIs. Entrypoints are no longer mandatory.

Ability to simply score with TensorFlow models: One can also simply load a TensorFlow model and score by using it without needing to add any additional learner and training process.

Better visibility of the transformed data: User’s have better visibility of the data while applying transformers.

As this API inclusion will be a significant change in ML.NET, the community has started an open discussion where users can provide their feedback and help shape the long-term API for ML.NET. Users can share their feedback on ML.NET GitHub repo.

Read more about ML.NET 0.5 in detail, on Microsoft blog.

Task parallel library for easy multi-threading in .NET Core [Tutorial]

Use App Metrics to analyze HTTP traffic, errors & network performance of a .NET Core app [Tutorial]

Microsoft’s .NET Core 2.1 now powers Bing.com