title: MsBuild Compile and build dependencies in parallel
body: <p>I am working on a large C++ solution with lots of projects.</p>
  
  <p>Some of those are build bottlenecks where dlls depend on a another that takes forever to build.</p>
  
  <p>I have plenty of CPUs to build, but I can't get MSBuild to compile (not link) everything in parallel and only use dependencies at link time.</p>
  
  <p>I essentially want to have on every project:</p>
  
  <pre><code># build objects
  msbuild /t:BuildCompile project.vcxproj
  
  # only now build/wait for dependencies
  msbuild /t:ResolveReferences;BuildLink project.vcxproj
  </code></pre>
  
  <p>I want the above to work as part of a single build (cascade to dependent projects).</p>
  
  <p>I have been trying to mess around with MSBuild target build orders:</p>
  
  <pre><code>&lt;PropertyGroup&gt;
    &lt;BuildSteps&gt;
      SetBuildDefaultEnvironmentVariables;
      SetUserMacroEnvironmentVariables;
      PrepareForBuild;
      InitializeBuildStatus;
      BuildGenerateSources;
      BuildCompile;
  
      ResolveReferences;
  
      BuildLink;
    &lt;/BuildSteps&gt;
  &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>does not work, Resolve Dependencies in this setup does not build dependent projects.</p>
  
  <p>Any ideas? Only the linker actually depends on referenced projects, the objs do not.</p>