title: Build Fails only when publishing
body: <p>I'm running visual studio 2017, I'm trying to FTP deploy a .net-core 2.0 project to my server.  My project builds fine normally but when I attempt to publish I get an error:</p>
  
  <blockquote>
    <p>System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details.
       --- End of inner exception stack trace ---
       at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
       at Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.&lt;>c__DisplayClass40_0.b__2()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()</p>
  </blockquote>
  
  <p>This issue only occurs when I publish.  A bunch of error popup in the output window for third party dlls <code>Microsoft.AspNetCore.StaticFiles</code> and <code>System.IdentityModel.Tokens.Jwt</code> </p>
  
  <p>Any idea on how I can get publish working?</p>