You are here
Home > Latest Posts > 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)

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.

Fall Creators Update (FCU) as the minimum version of your UWP project (.NET Standard 2.0)

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

Shafat

Shafat has more than 5 years of Tech journalism experience. He likes to write about latest Tech and Gadgets. He is a proud Lumia 950 owner and Windows fan. He has been covering Tech and Gadget news on other well-known Tech sites GadgetOx and Nokiapoweruser since long. He loves to code and is a proficient developer.
Write to him at Email: [email protected]

  • Andrés

    Will it be compatible with previous versions of UWP?

    • Yes, it is more of a standardization of .NET APIs so that developers could write code which would possibly run across different platforms like Android and iOS. For example, developing apps with Xamarin.

Top