title: The CreateAppHost task failed unexpectedly. MSB4018
body: <p>When I try and build my ASP.NET Core project, I continue to get this error message in Visual Studio 2019. 
  When I build it the second time, the error disappears. </p>
  
  <p>Does anyone know what this error means and how to get rid of it?</p>
  
  <p>Thanks!</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;CreateAppHost AppHostSourcePath="$(AppHostSourcePath)"
                     AppHostDestinationPath="$(AppHostIntermediatePath)"
                     AppBinaryName="$(AssemblyName)$(TargetExt)"
                     IntermediateAssembly="@(IntermediateAssembly-&gt;'%(FullPath)')"
                     WindowsGraphicalUserInterface="$(_UseWindowsGraphicalUserInterface)"
                     Retries="$(CopyRetryCount)"
                     RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
                     /&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/bl7zV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bl7zV.png" alt="enter image description here"></a></p>