title: Prevent installing my NuGet package to project with unsupported target framework
body: <p>My NuGet Package targets .NET Standard 2.0 and .NET Framework 4.0.</p>
  <p>The .nuspec looks like:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;package&gt;
    &lt;metadata&gt;
      ...
      &lt;dependencies&gt;
        &lt;group targetFramework=&quot;.NETStandard2.0&quot;/&gt;
        &lt;group targetFramework=&quot;.NETFramework4.0&quot;/&gt;
      &lt;/dependencies&gt;
    &lt;/metadata&gt;
    &lt;files&gt;
      &lt;file src=&quot;...\net40\WinSCPnet.dll&quot; target=&quot;lib\net40&quot;/&gt;
      &lt;file src=&quot;...\netstandard2.0\WinSCPnet.dll&quot; target=&quot;lib\netstandard2.0&quot;/&gt;
    &lt;/files&gt;
  &lt;/package&gt;
  </code></pre>
  <p>The assembly included in the package has:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;TargetFrameworks&gt;net40;netstandard2.0&lt;/TargetFrameworks&gt;
  </code></pre>
  <p>But this does not prevent the package from being installed to projects that target different frameworks. For example it can be installed to project targeting .NET Framework 3.5. Obviously it does not work then, as there's no 3.5 version of the assembly.</p>
  <p>I assume it should be somehow possible to prevent installing the package to projects targeting unsupported frameworks. For example question <a href="https://stackoverflow.com/q/62391398/850848">NuGet package not installing in .NET Framework</a> shows that certain packaged failed to install for this very reason. How do I achieve that in my package?</p>