title: .Net class library compilation error on build machine
body: <p>I have a SDK styled .Net class library which compiles properly on my local machine, however fails on build server.</p>
  <p>The contents of .csproj are</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFrameworks&gt;net35;net40;netstandard1.0&lt;/TargetFrameworks&gt;
      &lt;TargetFrameworkVersion&gt;v4.0&lt;/TargetFrameworkVersion&gt;
      &lt;Version&gt;1.5.6&lt;/Version&gt;
      &lt;GeneratePackageOnBuild&gt;true&lt;/GeneratePackageOnBuild&gt;
    &lt;/PropertyGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  <p>The error displayed is:
  NETSDK1045: The current .NET SDK does not support targeting .NET Standard 4.0. Either target .NET Standard 2.1 or lower, or use a version of the .NET SDK that supports .NET Standard 4.0</p>
  <p>I have .NET Core 3.1.113 installed on build server and .NET 5 installed on local machine.</p>
  <p>Note: If I remove <code>netstandard1.0</code> from TargetFrameworks then build succeeds on both the machines. However I want my library to target .net standard 1.0 as well.</p>
  <p>I cannot understand why v4.0 is treated as .NET Standard 4.0 on build server. Can anyone let me know what the problem might be?</p>