title: How do I conditionally build .Net Core 3.0 only if supported by tooling?
body: <p>I would like to use the TargetFrameworks .csproj element to multi-target both .Net Core 3.0 (netcoreapp3.0) and .Net Framework 4.8 (net48) for a console application, like so:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
      &lt;PropertyGroup&gt;
          &lt;OutputType&gt;Exe&lt;/OutputType&gt;
          &lt;TargetFrameworks&gt;netcoreapp3.0;net48&lt;/TargetFrameworks&gt;
          &lt;AssemblyName&gt;MyConsoleApp&lt;/AssemblyName&gt;
      &lt;/PropertyGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>However, I would like the same .csproj file to degrade gracefully in older tooling and compile <em>only</em> .Net Framework 4.8 when the tooling does not support netcoreapp3.0 (such as with Visual Studio 2017).</p>
  
  <p>I reviewed the conditional compilation documentation, but it seems to talk only about changing settings <em>when</em> compiling, not whether to do the compilation in the first place.</p>
  
  <p>How can I accomplish this?</p>