{"id":14215,"date":"2017-08-14T09:11:17","date_gmt":"2017-08-14T16:11:17","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/dotnet\/?p=14215"},"modified":"2021-09-29T16:40:43","modified_gmt":"2021-09-29T23:40:43","slug":"announcing-net-standard-2-0","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-standard-2-0\/","title":{"rendered":"Announcing .NET Standard 2.0"},"content":{"rendered":"<p>The<span>\u00a0<\/span><a href=\"https:\/\/github.com\/dotnet\/standard\/blob\/master\/docs\/versions\/netstandard2.0.md\">.NET Standard 2.0 specification<\/a><span>\u00a0<\/span>is now complete. It is supported in<span>\u00a0<\/span><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-2-0\/\">.NET Core 2.0<\/a>, in the<span>\u00a0<\/span><a href=\"https:\/\/github.com\/Microsoft\/dotnet\/blob\/master\/releases\/README.md\">.NET Framework 4.6.1 and later versions<\/a>, and in <a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2017\/08\/14\/visual-studio-2017-version-15-3-released\/\">Visual Studio 15.3<\/a>. You can start using .NET Standard 2.0 today.<\/p>\n<p>While this post demos .NET Standard in C#, it&#8217;s also supported in <a href=\"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2017\/08\/14\/new-for-visual-basic-net-standard-class-libraries-and-the-dotnet-cli\/\">Visual Basic<\/a> and <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2017\/08\/14\/f-and-net-core-roadmap-update\/\">F#<\/a>.\u00a0For more details, take a look at the <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/standard\/net-standard\">.NET Standard documentation<\/a>\u00a0as well as the <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/?view=netstandard-2.0\">API browser<\/a>.<\/p>\n<h2><a href=\"https:\/\/github.com\/Microsoft\/dotnet-blog\/blob\/55e5e4b3491cad1f7fa9787b1e386e424501857b\/2017\/08-Aug\/netstandard20\/net_standard_post.md#for-the-impatient-tldr\" id=\"user-content-for-the-impatient-tldr\" class=\"anchor\"><\/a>For the impatient: TL;DR<\/h2>\n<ul>\n<li><strong>.NET Standard is for sharing code<\/strong>. .NET Standard is a set of APIs that all .NET implementations must provide to conform to the standard. This unifies the .NET implementations and prevents future fragmentation. It replaces Portable Class Libraries (PCLs) as the tool for building .NET libraries that work everywhere.<\/li>\n<li><strong>Much bigger API Surface<\/strong>: We have more than doubled the set of available APIs from<span>\u00a0<\/span><strong>13k<\/strong><span>\u00a0<\/span>in<span>\u00a0<\/span><a href=\"https:\/\/github.com\/dotnet\/standard\/blob\/master\/docs\/versions\/netstandard1.6.md\">.NET Standard 1.6<\/a><span>\u00a0<\/span>to<span>\u00a0<\/span><strong>32k<\/strong><span>\u00a0<\/span>in<span>\u00a0<\/span><a href=\"https:\/\/github.com\/dotnet\/standard\/blob\/master\/docs\/versions\/netstandard2.0.md\">.NET Standard 2.0<\/a>. Most of them are existing .NET Framework APIs. These additions make it much easier to port existing code to .NET Standard, and, by extension, to any .NET implementation of .NET Standard, such as .NET Core 2.0 and the upcoming version of UWP.<\/li>\n<li><strong>.NET Framework compatibility mode<\/strong>: The vast majority of NuGet packages are currently still targeting .NET Framework. Many projects are currently blocked from moving to .NET Standard because not all their dependencies are targeting .NET Standard yet. That&#8217;s why we added a compatibility mode that allows .NET Standard projects to reference .NET Framework libraries. While this may not work in all cases (for instance, if the .NET Framework binaries use WPF) we found that<span>\u00a0<\/span><a href=\"https:\/\/www.youtube.com\/watch?v=iIlQer4LEac\">70% of all NuGet packages on nuget.org are API compatible<\/a><span>\u00a0<\/span>with .NET Standard 2.0. So in practice it unblocks many projects.<\/li>\n<li><strong>Broad platform support<\/strong>. .NET Standard 2.0 is<span>\u00a0<\/span><a href=\"https:\/\/github.com\/dotnet\/standard\/blob\/master\/docs\/versions.md\">supported on the following platforms<\/a>:\n<ul>\n<li>.NET Framework 4.6.1<\/li>\n<li>.NET Core 2.0<\/li>\n<li>Mono 5.4<\/li>\n<li>Xamarin.iOS 10.14<\/li>\n<li>Xamarin.Mac 3.8<\/li>\n<li>Xamarin.Android 7.5<\/li>\n<li>Upcoming version of UWP (expected to ship later this year)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><a href=\"https:\/\/github.com\/Microsoft\/dotnet-blog\/blob\/55e5e4b3491cad1f7fa9787b1e386e424501857b\/2017\/08-Aug\/netstandard20\/net_standard_post.md#creating-a-net-standard-library\" id=\"user-content-creating-a-net-standard-library\" class=\"anchor\"><\/a>Creating a .NET Standard library<\/h2>\n<p>Let&#8217;s see .NET Standard 2.0 in action by creating a new project. You can do this in Visual Studio by invoking<span>\u00a0<\/span><strong>File<\/strong><span>\u00a0<\/span>|<span>\u00a0<\/span><strong>New Project<\/strong>. Choose<span>\u00a0<\/span><strong>Class Library (.NET Standard)<\/strong><span>\u00a0<\/span>from the<span>\u00a0<\/span><strong>.NET Standard<\/strong><span>\u00a0<\/span>category:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_01_new_project.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_01_new_project.png\" alt=\"\" width=\"1192\" height=\"804\" class=\"aligncenter size-full wp-image-14216\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_01_new_project.png 1192w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_01_new_project-300x202.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_01_new_project-768x518.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_01_new_project-1024x691.png 1024w\" sizes=\"(max-width: 1192px) 100vw, 1192px\" \/><\/a><\/p>\n<p>From the command-line, you can use<span>\u00a0<\/span><code>dotnet new<\/code><span>\u00a0<\/span>to create a new library (which by default is targeting .NET Standard):<\/p>\n<pre><code>$ dotnet new lib -o mylibrary\n<\/code><\/pre>\n<p>To make this library a bit more interesting. Edit the file<span>\u00a0<\/span><code>Class1.cs<\/code><span>\u00a0<\/span>as follows:<\/p>\n<div class=\"highlight highlight-source-cs\">\n<pre><span class=\"pl-k\">using<\/span> <span class=\"pl-en\">System<\/span>;\n\n<span class=\"pl-k\">namespace<\/span> <span class=\"pl-en\">mylibrary<\/span>\n{\n    <span class=\"pl-k\">public<\/span> <span class=\"pl-k\">class<\/span> <span class=\"pl-en\">Class1<\/span>\n    {\n        <span class=\"pl-k\">public<\/span> <span class=\"pl-k\">static<\/span> <span class=\"pl-k\">string<\/span> <span class=\"pl-en\">GetMessage<\/span>() =&gt; <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>Hello from .NET Standard!<span class=\"pl-pds\">\"<\/span><\/span>;\n    }\n}<\/pre>\n<\/div>\n<h2>Consuming a .NET Standard library<\/h2>\n<p>Before we can consume the library, we need to create a project. Let&#8217;s create an empty ASP.NET Core application. In Visual Studio, create a new project and choose<span>\u00a0<\/span><strong>ASP.NET Core Web Application\u00a0<\/strong>from the<span>\u00a0<\/span><strong>.NET Core<\/strong><span>\u00a0<\/span>category. Then choose<span>\u00a0<\/span><strong>Empty<\/strong><span>\u00a0<\/span>and make sure<span>\u00a0<\/span><strong>ASP.NET Core 2.0<\/strong><span>\u00a0<\/span>is selected:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_05_aspnetcore.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_05_aspnetcore.png\" alt=\"\" width=\"1378\" height=\"899\" class=\"aligncenter size-full wp-image-14285\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_05_aspnetcore.png 1378w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_05_aspnetcore-300x196.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_05_aspnetcore-768x501.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_05_aspnetcore-1024x668.png 1024w\" sizes=\"(max-width: 1378px) 100vw, 1378px\" \/><\/a><\/p>\n<p>From the command-line, you can simply use<span>\u00a0<\/span><code>dotnet new<\/code><span>\u00a0<\/span>again:<\/p>\n<pre><code>$ dotnet new web -o aspnetcore\n<\/code><\/pre>\n<p>Consuming a .NET Standard library works the same as any other library project: you simply reference it. In Visual Studio, right-click your web project and click on<span>\u00a0<\/span><strong>Add<\/strong><span>\u00a0<\/span>|<span>\u00a0<\/span><strong>Reference&#8230;<\/strong>. Then choose<span>\u00a0<\/span><strong>mylibrary<\/strong><span>\u00a0<\/span>from the<span>\u00a0<\/span><strong>Projects<\/strong><span>\u00a0<\/span>tab.<\/p>\n<p>From the command-line, you can use<span>\u00a0<\/span><code>dotnet add<\/code>:<\/p>\n<pre><code>$ dotnet add reference ..\/mylibrary\/mylibrary.csproj\n<\/code><\/pre>\n<p>Now edit the file<span>\u00a0<\/span><code>Startup.cs<\/code><span>\u00a0<\/span>and change the invocation of the<span>\u00a0<\/span><code>Run<\/code><span>\u00a0<\/span>method as follows:<\/p>\n<div class=\"highlight highlight-source-cs\">\n<pre><span class=\"pl-en\">app.Run<\/span>(<span class=\"pl-en\">async<\/span> (context) =&gt;\n{\n    <span class=\"pl-k\">var<\/span> <span class=\"pl-en\">message <\/span>= mylibrary.Class1.GetMessage();\n    <span class=\"pl-k\">await<\/span> context.Response.WriteAsync(message);\n});<\/pre>\n<\/div>\n<p>To start the web application, you can simply press<span>\u00a0<\/span><strong>F5<\/strong><span>\u00a0<\/span>in Visual Studio. On the command-line, use<span>\u00a0<\/span><code>dotnet run<\/code>:<\/p>\n<pre><code>$ dotnet run\nNow listening on: http:\/\/localhost:50878\nApplication started. Press Ctrl+C to shut down.\n<\/code><\/pre>\n<p>To see the web site, open a browser and navigate to the printed URL:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_06_browser-1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_06_browser.1.png\" alt=\"\" width=\"1086\" height=\"466\" class=\"aligncenter size-full wp-image-14295\" \/><\/a><\/p>\n<p><span>Congratulations! Your .NET Standard 2.0 library is now running on .NET Core. You can also use it from the .NET Framework or a Xamarin app and the experience would be very similar.<\/span><\/p>\n<h2><a href=\"https:\/\/github.com\/Microsoft\/dotnet-blog\/blob\/55e5e4b3491cad1f7fa9787b1e386e424501857b\/2017\/08-Aug\/netstandard20\/net_standard_post.md#reusing-an-existing-net-framework-library\" id=\"user-content-reusing-an-existing-net-framework-library\" class=\"anchor\"><\/a>Reusing an existing .NET Framework library<\/h2>\n<p>Now let&#8217;s add a reference to a NuGet package that doesn&#8217;t target .NET Standard yet,<span>\u00a0<\/span><a href=\"https:\/\/www.nuget.org\/packages\/Huitian.PowerCollections\">Huitian.PowerCollections<\/a>. In Visual Studio, right-click the <strong>mylibrary<\/strong> project\u00a0and choose<span>\u00a0<\/span><strong>Manage NuGet Packages<\/strong>. Then select<span>\u00a0<\/span><strong>Browse<\/strong><span>\u00a0<\/span>and search for<span>\u00a0<\/span><strong>Huitian.PowerCollections<\/strong>. Click on<span>\u00a0<\/span><strong>Install<\/strong>.<\/p>\n<p>As a command-line user, you can achieve the same by using<span>\u00a0<\/span><code>dotnet add package<\/code>:<\/p>\n<pre><code>$ dotnet add package Huitian.PowerCollections\n<\/code><\/pre>\n<p>The following warning is displayed after you installed the package:<\/p>\n<blockquote><p>NU1701: Package &#8216;Huitian.PowerCollections 1.0.0&#8217; was restored using &#8216;.NETFramework,Version=v4.6.1&#8217; instead of the project target framework &#8216;.NETStandard,Version=v2.0&#8217;. This package may not be fully compatible with your project.<\/p><\/blockquote>\n<p>This warning not only appears when installing the package, but every time you build. This ensures you don&#8217;t accidentally overlook it.<\/p>\n<p>The reason for the warning is that NuGet has no way of knowing whether the .NET Framework library will actually work. For example, it might depend on Windows Forms. To make sure you don&#8217;t waste your time troubleshooting something that cannot work, NuGet lets you know that you&#8217;re potentially going off the rails. Of course, warnings you have to overlook are annoying. Thus, we recommend that you test your application\/library and if you find everything is working as expected, you can suppress the warning.<\/p>\n<p>If you&#8217;re using the command-line, edit your project file and add the<span>\u00a0<\/span><code>NoWarn<\/code><span>\u00a0<\/span>attribute on the<span>\u00a0<\/span><code>PackageReference<\/code><span>\u00a0<\/span>that you want to suppress the warning for. The value for the attribute is a comma separated list of all the warning IDs. In our case it&#8217;s only a single one, namely<span>\u00a0<\/span><code>NU1701<\/code>:<\/p>\n<div class=\"highlight highlight-text-xml\">\n<pre>&lt;<span class=\"pl-ent\">ItemGroup<\/span>&gt;\n  &lt;<span class=\"pl-ent\">PackageReference<\/span> <span class=\"pl-e\">Include<\/span>=<span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>Huitian.PowerCollections<span class=\"pl-pds\">\"<\/span><\/span> <span class=\"pl-e\">Version<\/span>=<span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>1.0.0<span class=\"pl-pds\">\"<\/span><\/span> <span class=\"pl-e\">NoWarn<\/span>=<span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>NU1701<span class=\"pl-pds\">\"<\/span><\/span> \/&gt;\n&lt;\/<span class=\"pl-ent\">ItemGroup<\/span>&gt;<\/pre>\n<\/div>\n<p>In Visual Studio, right-click the package reference you want to suppress the warning for in<span>\u00a0<\/span><strong>Solution Explorer<\/strong><span>\u00a0<\/span>and select<span>\u00a0<\/span><strong>Properties<\/strong>. Set the<span>\u00a0<\/span><strong>NoWarn\u00a0<\/strong>property to<span>\u00a0<\/span><code>NU1701<\/code><span>\u00a0<\/span>as in the following example.<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_02_suppression.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_02_suppression.png\" alt=\"\" width=\"522\" height=\"782\" class=\"aligncenter size-full wp-image-14225\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_02_suppression.png 522w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_02_suppression-200x300.png 200w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p>Building the project will now show zero warnings. Notice that the suppression isn&#8217;t global but specific to each package reference. This ensures that just using one library through the compatibility mode doesn&#8217;t result in a free ride for all future references. So if you install another library that needs the compatibility mode, you&#8217;ll get the warning again and you&#8217;ll need to suppress it for that package too.<\/p>\n<h2><a href=\"https:\/\/github.com\/Microsoft\/dotnet-blog\/blob\/55e5e4b3491cad1f7fa9787b1e386e424501857b\/2017\/08-Aug\/netstandard20\/net_standard_post.md#producing-a-nuget-package\" id=\"user-content-producing-a-nuget-package\" class=\"anchor\"><\/a>Producing a NuGet package<\/h2>\n<p>When your library is ready, you can produce a NuGet package for it and publish it (I&#8217;m assuming that&#8217;s our goal). To do this in Visual Studio, right-click your project and select<span>\u00a0<\/span><strong>Properties<\/strong>. On the<span>\u00a0<\/span><strong>Package<\/strong><span>\u00a0<\/span>tab, check the box for<span>\u00a0<\/span><strong>Generate NuGet package on build<\/strong>:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_03_generatenupkg.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_03_generatenupkg.png\" alt=\"\" width=\"1161\" height=\"330\" class=\"aligncenter size-full wp-image-14226\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_03_generatenupkg.png 1161w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_03_generatenupkg-300x85.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_03_generatenupkg-768x218.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_03_generatenupkg-1024x291.png 1024w\" sizes=\"(max-width: 1161px) 100vw, 1161px\" \/><\/a><\/p>\n<p>If you&#8217;re using the command-line, edit the project file and add the<span>\u00a0<\/span><code>GeneratePackageOnBuild<\/code><span>\u00a0<\/span>property with a value of<span>\u00a0<\/span><code>true<\/code>:<\/p>\n<div class=\"highlight highlight-text-xml\">\n<pre>&lt;<span class=\"pl-ent\">PropertyGroup<\/span>&gt;\n  &lt;<span class=\"pl-ent\">TargetFramework<\/span>&gt;netstandard2.0&lt;\/<span class=\"pl-ent\">TargetFramework<\/span>&gt;\n  &lt;<span class=\"pl-ent\">GeneratePackageOnBuild<\/span>&gt;true&lt;\/<span class=\"pl-ent\">GeneratePackageOnBuild<\/span>&gt;\n&lt;\/<span class=\"pl-ent\">PropertyGroup<\/span>&gt;<\/pre>\n<\/div>\n<p>When you rebuild your project, you&#8217;ll also find a NuGet package in the output directory.<\/p>\n<h2><a href=\"https:\/\/github.com\/Microsoft\/dotnet-blog\/blob\/55e5e4b3491cad1f7fa9787b1e386e424501857b\/2017\/08-Aug\/netstandard20\/net_standard_post.md#what-about-portable-class-libraries\" id=\"user-content-what-about-portable-class-libraries\" class=\"anchor\"><\/a>What about Portable Class Libraries?<\/h2>\n<p>If you&#8217;re sharing code between different .NET implementations today, you&#8217;re probably aware of Portable Class Libraries (PCLs). With the release of .NET Standard 2.0, we&#8217;re now officially deprecating PCLs and you should move your projects to .NET Standard:<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_04_pcls.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_04_pcls.png\" alt=\"\" width=\"1316\" height=\"806\" class=\"aligncenter size-full wp-image-14235\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_04_pcls.png 1316w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_04_pcls-300x184.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_04_pcls-768x470.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2017\/08\/net_standard_04_pcls-1024x627.png 1024w\" sizes=\"(max-width: 1316px) 100vw, 1316px\" \/><\/a><\/p>\n<h2><a href=\"https:\/\/github.com\/Microsoft\/dotnet-blog\/blob\/55e5e4b3491cad1f7fa9787b1e386e424501857b\/2017\/08-Aug\/netstandard20\/net_standard_post.md#summary\" id=\"user-content-summary\" class=\"anchor\"><\/a>Summary<\/h2>\n<p>.NET Standard 2.0 has doubled the APIs since .NET Standard 1.x, which means it&#8217;s now much easier to port existing code from .NET Framework to .NET Standard. It also adds a compatibility mode for referencing existing .NET Framework binaries from .NET Standard. This allows you to get started although not all of your dependencies have ported to .NET Standard yet.<\/p>\n<p>Virtually all .NET implementations have support for .NET Standard 2.0, including .NET Framework, .NET Core, and Xamarin. UWP support will come later this year. All these implementations benefit from the added APIs and the compatibility mode, especially .NET Core and UWP, which used to have a much more constrained API set.<\/p>\n<p><strong>Are you building applications?<\/strong><span>\u00a0<\/span>Then, we recommend that you convert your business logic and UI-independent code to .NET Standard. This ensures no matter where your business needs to go &#8212; desktop, mobile, or cloud &#8212; your code can come along for the ride.<\/p>\n<p><strong>Are you building NuGet packages<\/strong>? Then move to .NET Standard 2.0. You get a lot of APIs without compromising on reach. And your consumers will love it too!<\/p>\n<p>Let us know what you think in the comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The\u00a0.NET Standard 2.0 specification\u00a0is now complete. It is supported in\u00a0.NET Core 2.0, in the\u00a0.NET Framework 4.6.1 and later versions, and in Visual Studio 15.3. You can start using .NET Standard 2.0 today. While this post demos .NET Standard in C#, it&#8217;s also supported in Visual Basic and F#.\u00a0For more details, take a look at the [&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":[9,30,43,117],"class_list":["post-14215","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","tag-net-core","tag-announcement","tag-bcl","tag-releases"],"acf":[],"blog_post_summary":"<p>The\u00a0.NET Standard 2.0 specification\u00a0is now complete. It is supported in\u00a0.NET Core 2.0, in the\u00a0.NET Framework 4.6.1 and later versions, and in Visual Studio 15.3. You can start using .NET Standard 2.0 today. While this post demos .NET Standard in C#, it&#8217;s also supported in Visual Basic and F#.\u00a0For more details, take a look at the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/14215","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=14215"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/14215\/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=14215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=14215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=14215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}