title: Visual Studio: copy dependent DLLs to target folder
body: <p>I realize that this question has been asked before - but none of the answers apply to my specific case:</p>
  
  <ul>
  <li><p>I have a solution containing a native C++ EXE project, which in turn depends on 40+ native C++ DLL projects (in the same solution). </p></li>
  <li><p>The EXE project has the usual <em>Debug</em>, <em>Release</em> (and <em>Profile</em>) configuration, but since them same source code base is used to build three different applications (say <em>A1</em>, <em>A2</em> and <em>A3</em>). In addition, it targets x32 and x64, so that's a total of 3 x 3 x 2 = 18 project configurations.</p></li>
  <li><p>The DLL projects are shared by all three target applications, so there are only 3 (<em>Debug</em>, <em>Release</em>, <em>Profile</em>) times 2 (x32, x64) = 6 configurations.</p></li>
  <li><p>Since the EXE project depends on the DLLs, it needs to copy the relevant output of the DLL projects to its target folder (or a subfolder thereof) whenever they are modified.</p></li>
  </ul>
  
  <p>How would you handle updating of the DLLs?</p>
  
  <ul>
  <li><p>A post-build action in each DLL project doesn't work (well), as it would have to copy the DLL to the relevant output folder of <em>A1</em>, <em>A2</em> and <em>A3</em>. Any change in an output folder results in having to modify the post-build action in each of the 50 DLL projects.</p></li>
  <li><p>I currently added the DLLs themselves as project items to the EXE project, and configured a custom build tool to copy it to the output folder. But that requires me to add each DLL 6 times, so I end up with 6 x 50 = 300 DLLs!</p></li>
  </ul>
  
  <p>What I really need is something like a Copy Local option, which unfortunately only works assemblies. Do solution do you suggest to simplify this build setup?</p>