Home Latest News Developer News You can now use .NET Standard 2.0 with UWP development (preview)

You can now use .NET Standard 2.0 with UWP development (preview)

2
Standard

Microsoft recently released the .NET Core 2.0 and the .NET Standard 2.0 for developers to be used in production builds. This was followed by the first Preview of Visual Studio 2017 version 15.4 which updates the UWP tooling that supports .NET Standard 2.0.

What does this mean for UWP development with .NET ?

Before we dive in, you should target the Fall Creators Update (FCU) as the minimum version of your UWP project. That’s because .NET Standard 2.0 contains many APIs that require FCU to make them work in the context of the UWP execution environment, specifically AppContainer.

What’s new with .NET Standard 2.0?

.NET Standard is a specification of APIs that all .NET implementations have to implement. UWP is now adding support for .NET Standard 2.0.

The key advantage of .NET Standard 2.0 is that it makes .NET implementations of .NET Standard much more similar to .NET Framework. With .NET Standard 2.0, about 20,000 more APIs become available compared to .NET Standard 1.6. The vast majority of them are existing .NET Framework APIs, which includes missing reflection APIs, non-generic collections, DataSet, binary serialization, XML Schema, and many more. For a full list, take a look at the diff between .NET Standard 2.0 and .NET Standard 1.6.

This makes it much easier to port existing .NET Framework code to UWP. This includes both, copy & pasting existing code, but also extends to referencing existing .NET Framework binaries, via the compatibility mode. Here is an example of using DataSet inside a UWP application

To get started, check out the video introduction below.

Source

Exit mobile version