{"id":14455,"date":"2017-08-25T14:00:11","date_gmt":"2017-08-25T21:00:11","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/dotnet\/?p=14455"},"modified":"2021-09-29T16:40:12","modified_gmt":"2021-09-29T23:40:12","slug":"uwp-net-standard-2-0-preview","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/uwp-net-standard-2-0-preview\/","title":{"rendered":"UWP &amp; .NET Standard 2.0: A preview is now available!"},"content":{"rendered":"<p>Today, we\u00a0<a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2017\/08\/25\/visual-studio-2017-version-15-4-preview\/\">released the first Preview of Visual Studio 2017 version 15.4<\/a>. This includes an update to the UWP tooling that supports .NET Standard 2.0. In this post, I&#8217;ll outline what this means for UWP development with .NET.<\/p>\n<h2><a id=\"user-content-prerequisites\" class=\"anchor\" href=\"https:\/\/github.com\/terrajobst\/dotnet-blog\/blob\/ff9b4776d54f721be912d48a8c4e10da3c433ae7\/2017\/08-Aug\/netstandard20-uwp\/netstandard20-uwp.md#prerequisites\"><\/a>Prerequisites<\/h2>\n<p>In order to use .NET Standard 2.0 in UWP, you need to target Fall Creators Update (FCU) as the minimum version of your UWP project. That&#8217;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.<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/netstandard20-uwp-01-sdk.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-14457\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/netstandard20-uwp-01-sdk.png\" alt=\"\" width=\"869\" height=\"354\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/netstandard20-uwp-01-sdk.png 869w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/netstandard20-uwp-01-sdk-300x122.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/netstandard20-uwp-01-sdk-768x313.png 768w\" sizes=\"(max-width: 869px) 100vw, 869px\" \/><\/a><\/p>\n<h2><a id=\"user-content-whats-new-with-net-standard-20\" class=\"anchor\" href=\"https:\/\/github.com\/terrajobst\/dotnet-blog\/blob\/ff9b4776d54f721be912d48a8c4e10da3c433ae7\/2017\/08-Aug\/netstandard20-uwp\/netstandard20-uwp.md#whats-new-with-net-standard-20\"><\/a>What&#8217;s new with .NET Standard 2.0?<\/h2>\n<p>.NET Standard is a specification of APIs that all .NET implementations have to implement. UWP is now adding support for .NET Standard 2.0.<\/p>\n<p>The key advantage of\u00a0<a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2017\/08\/14\/announcing-net-standard-2-0\/\">.NET Standard 2.0<\/a>\u00a0is that it makes .NET implementations of .NET Standard much more similar to .NET Framework. With .NET Standard 2.0,\u00a0<a href=\"https:\/\/github.com\/dotnet\/standard\/blob\/master\/docs\/versions\/netstandard2.0.md\">about 20,000 more APIs<\/a>\u00a0become 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,\u00a0<code>DataSet<\/code>, binary serialization, XML Schema, and many more. For a full list, take a look at the\u00a0<a href=\"https:\/\/github.com\/dotnet\/standard\/blob\/master\/docs\/versions\/netstandard2.0.md\">diff between .NET Standard 2.0 and .NET Standard 1.6<\/a>.<\/p>\n<p>This makes it much easier to port existing .NET Framework code to UWP. This includes both, copy &amp; pasting existing code, but also extends to referencing existing .NET Framework binaries, via the compatibility mode. Here is an example of using\u00a0<code>DataSet<\/code>\u00a0inside a UWP application:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/netstandard20-uwp-02-dataset-1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-14465\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/netstandard20-uwp-02-dataset.1.png\" alt=\"\" width=\"2155\" height=\"1340\" \/><\/a><\/p>\n<p>For more details, check out my\u00a0<a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2017\/08\/14\/announcing-net-standard-2-0\/\">blog post on .NET Standard 2.0<\/a>.<\/p>\n<p><center>\n<iframe width=\"650\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/HyfDG4mjBPk?list=PLRAdsfhKI4OWx321A_pr-7HhRNk7wOLLY\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/center><\/p>\n<h2>Summary<\/h2>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2017\/08\/25\/visual-studio-2017-version-15-4-preview\/\">Visual Studio 2017 version 15.4 Preview 1<\/a>\u00a0adds support for .NET Standard 2.0 in UWP projects that require Fall Creators Update (FCU). Please give it a spin and tell us what you think!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, we\u00a0released the first Preview of Visual Studio 2017 version 15.4. This includes an update to the UWP tooling that supports .NET Standard 2.0. In this post, I&#8217;ll outline what this means for UWP development with .NET. Prerequisites In order to use .NET Standard 2.0 in UWP, you need to target Fall Creators Update (FCU) [&hellip;]<\/p>\n","protected":false},"author":335,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685],"tags":[4,30,143],"class_list":["post-14455","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","tag-net","tag-announcement","tag-uwp"],"acf":[],"blog_post_summary":"<p>Today, we\u00a0released the first Preview of Visual Studio 2017 version 15.4. This includes an update to the UWP tooling that supports .NET Standard 2.0. In this post, I&#8217;ll outline what this means for UWP development with .NET. Prerequisites In order to use .NET Standard 2.0 in UWP, you need to target Fall Creators Update (FCU) [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/14455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/335"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=14455"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/14455\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=14455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=14455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=14455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}