title: Team City Fails to Build Dot Net Core, But Manual Build Works
body: <p>I have a nuget package that I am updating to multi-target (including DotNet Core 2.
  2).</p>
  
  <p>I set it up in Team City and I get an error when I run the build.</p>
  
  <p>So I logged into the build server to try to build from Visual Studio.  The manual build succeeded!</p>
  
  <p>So I tried my team city build again, and it Succeeded!</p>
  
  <p>Suspicious of this, I checked the "delete everything before build" box, and it failed again! Same error!</p>
  
  <p>So this seems to be a Team City thing.  Here is the first of MANY error messages it gives me:</p>
  
  <blockquote>
    <p>D:\BuildAgent\temp\buildTmp\.NETStandard,Version=v2.0.AssemblyAttributes.cs(4, 20): error CS0400: The type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?)</p>
  </blockquote>
  
  <p>It seems like every target I have builds fine for the full Dot Net Framework.  But my one target for DotNet Core (2.2) fails.  (Again, it works fine when I login to the machine and build it manually from Visual Studio.)</p>
  
  <p><strong>Any idea what I can do to have Team City build my DotNet Core solution?</strong></p>
  
  <p>Here is the summary view of my build step:</p>
  
  <p><a href="https://i.stack.imgur.com/ERyja.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ERyja.png" alt="Visual Studio Build Step"></a></p>