title: MsBuild: Do not compile referenced project
body: <p>I have the following project structure:</p>
  
  <pre><code>SLN
      libA
      libB (references libA)
      exeWPF (references libA and libB)
  </code></pre>
  
  <p>I use NAnt to compile libA and libB, with csc, but I cannot use csc with the WPF project, XAML targets cannot be compiled with NAnt, so I use a MSBuild task inside the NAnt project.</p>
  
  <p>The problem is that when I launch a complete build, libA and libB are already by NAnt, and then when the MSBuild task is launched, the <code>libA</code> and <code>libB</code> libraries are compiled <strong>again</strong>, because the <code>exeWPF</code> csproj file references the libA and the libB projects.</p>
  
  <p>An alternative could be instead referencing <code>libA</code> and <code>libB</code> as projects, I could reference them as dlls in the <code>exeWPF</code> csproj file. The problem is that in this case I loose the code and, navigate to reference.</p>
  
  <p>The solution for me would be to be able to specify from the MSBuild task the references to the MsBuild project.</p>