title: How to control TargetFramework based on if netcore 2.x SDK is installed
body: <p>In the context of "I want to share samples with people", I would prefer no to tell people "you need netcore 2.x SDK installed to use this sample". People with only desktop .net should be able to still open the solution and run the solution.</p>
  
  <p>However if a project has this </p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
    &lt;PropertyGroup&gt;
      &lt;TargetFrameworks&gt;net461;netcoreapp2.0&lt;/TargetFrameworks&gt;
  </code></pre>
  
  <p>and does not have <code>netcoreapp2.0</code> installed they will get the following error</p>
  
  <blockquote>
    <p>The current .NET SDK does not support targeting .NET Core 2.0.  Either target .NET Core x or lower, or use a version of the .NET SDK that supports .NET Core 2.0.</p>
  </blockquote>