title: Is "Copy Local" transitive for project references?
body: <p><strong>Wrt. the proposed dupe:</strong> Since this here queston suggests the opposite of the <a href="https://stackoverflow.com/questions/12386523/visual-studio-not-copying-content-files-from-indirectly-referenced-project">linked question</a>, I'd rather like to think it is <em>not</em> a dupe.</p>
  
  <p><strong>First</strong>, I did read <a href="https://stackoverflow.com/questions/280751/what-is-the-best-practice-for-copy-local-and-with-project-references">What is the best practice for “Copy Local” and with project references?</a> (also <a href="https://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not">this</a>) and I'll have to try this out anyway, but getting general feedback on this seems necessary as the <a href="http://msdn.microsoft.com/en-us/library/vstudio/t1zz5y8c%28v=vs.100%29.aspx" rel="noreferrer">docs</a> on this stuff are horrible and I'm only on VS2010 and maybe they changed something in newer versions that'll be nice to know.</p>
  
  <p><strong>Second</strong>, I'm only interested in <strong><em>project</strong> references</em> for this question as I've <a href="https://stackoverflow.com/questions/320295/how-does-copy-local-work">read that assemblies from the GAC are handled differently</a> and the GAC is irrelevant for my problem.</p>
  
  <p><strong>Third</strong>, after reading the suggested dupe, but more so the nice <a href="https://stackoverflow.com/a/26163944/321013">answer</a> here by @Albireo, it would also appear that it is important to differentiate <em>file</em> dependencies, where the dependency references a dll assembly file and <em>project</em> dependencies (i.e. what I'm asking about), where the dependency references a <em>project</em> and implicitly the output file of that project.</p>
  
  <h3>Anyway, here's the situation, somewhat peculiar I think, but still:</h3>
  
  <ul>
  <li>2 C# executable projects</li>
  <li>n C# dll assembly projects</li>
  <li>The 2 executables have different output directories as they will be deployed separately and that way they're also separate on the developer machine</li>
  <li>The 2 executables have dependencies on some of the DLL assemblies (which may  depend on each other)</li>
  <li>There are three output directories:
  
  <ul>
  <li><code>/x1</code> for executable 1 project</li>
  <li><code>/x2</code> for executable 2 project</li>
  <li><code>/lib</code> for all the dll assemblies</li>
  </ul></li>
  </ul>
  
  <p>The DLL assemblies <em>all</em> have <code>Copy Local</code>set to <code>false</code> for their project references, as they all build to the same output directory.</p>
  
  <p>The 2 <strong>executable projects</strong> have set <code>Copy Local</code> to <strong><code>true</code></strong> for all the DLL assembly project references they reference directly, so that the DLLs will be copied into <code>/x1</code> <code>/x2</code> respectively.</p>
  
  <p><strong>The question</strong> now is wrt. to DLLs that are <em>not</em> directly referenced by an executable project, but <em>only</em> transitively through a referenced assembly: <strong>Will assemblies, that are <em>only</em> referenced transitively through another assembly, be copied into the output folder</strong> of the executable, when "Copy Local" <em>is</em> set to true on the first assembly?</p>
  
  <p>Example:</p>
  
  <ul>
  <li><code>x1.csproj</code> (e.g.Output = <code>x1/one.exe</code>)
  
  <ul>
  <li>Reference: <code>dlA.csproj</code> ( e.g. Output = <code>lib/a.dll</code>) with <code>Copy Local = *true*</code></li>
  <li>(no direct reference on b.dll)</li>
  </ul></li>
  <li><code>dlA.csproj</code> ( e.g. Output = <code>lib/a.dll</code>)
  
  <ul>
  <li>Reference: <code>dlB.csproj</code> ( e.g. Output = <code>lib/b.dll</code>) with <code>Copy Local = **false**</code></li>
  <li>(no direct reference on c.dll)</li>
  </ul></li>
  <li><code>dlC.csproj</code> ( e.g. Output = <code>lib/c.dll</code>)
  
  <ul>
  <li>(no further relevant references)</li>
  </ul></li>
  </ul>
  
  <p>Thus, we have a logical dependency of <code>one.exe -&gt; a.dll -&gt; b.dll -&gt; c.dll</code>, where only <code>a.dll</code> with obviously be copied to the output directory of <code>one.exe</code>. <strong>Will the other two dlls also be copied to the output directory?</strong> <em>Is this documented somewhere?</em></p>
  
  <hr>
  
  <p>And, yes, I tried it. And, yes, it <em>seems</em> to work, but I haven't poked it hard enough yet and anyway there maybe something more to it that I may have missed. (And also there's the question wrt. any official docs.)</p>