title: DEVENV Command line build fails with: "This operation may only take place in the UI thread"
body: <p>we virtualized our build server and having issues building some c++ projects.</p>
  
  <p>It is a win7 (we have some vb6 projects) with visual studio 2017.</p>
  
  <p>When I build a project it just errors out with "This operation may only take place in the UI thread".
  <strong>Also it is completely random...sometimes it compiles, sometimes it does not.</strong></p>
  
  <p>I have no idea why and what I could try to fix it. I have also a Win10 build machine where the problem does not happen. We want to stick with the Win7 build machine though, because on the Win10 one we got issues with some vb6 projects.</p>
  
  <p>If I use msbuild it works fine, I would rather not replace all devenv calls for now though.</p>
  
  <p>Anyone an idea what the issue could be or how to debug it?</p>