title: Include files in MSBuild that are not part of project
body: <p>I'm trying to create an automated build for my web application project. 
  We use a standard CMS project and have tweaked some parts of it. Only the tweaked files are part of our project, but I want to include the full CMS in the deployment package.</p>
  
  <p>So I've created a custom <code>.targets</code> file to define a task to include the CMS files during the build:</p>
  
  <pre><code>&lt;Target Name="GetCMSFiles"&gt;
    &lt;ItemGroup&gt;
      &lt;!-- Include the CMS files into the package --&gt;
      &lt;_CMSFiles Include="..\packages\CMSFiles\**\*" /&gt;
  
      &lt;FilesForPackagingFromProject  Include="%(_CMSFiles.Identity)"&gt;
        &lt;DestinationRelativePath&gt;
          %(RecursiveDir)%(Filename)%(Extension)
        &lt;/DestinationRelativePath&gt;
      &lt;/FilesForPackagingFromProject&gt;
    &lt;/ItemGroup&gt;
  &lt;/Target&gt;
  
  &lt;PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'"&gt;
    &lt;!-- VS2010 --&gt;
    &lt;CopyAllFilesToSingleFolderForPackageDependsOn&gt;
      GetCMSFiles;
      $(CopyAllFilesToSingleFolderForPackageDependsOn);
    &lt;/CopyAllFilesToSingleFolderForPackageDependsOn&gt;
    &lt;!-- VS2012 --&gt;
    &lt;CopyAllFilesToSingleFolderForMsdeployDependsOn&gt;
      GetCMSFiles;
      $(CopyAllFilesToSingleFolderForMsdeployDependsOn);
    &lt;/CopyAllFilesToSingleFolderForMsdeployDependsOn&gt;
  &lt;/PropertyGroup&gt; 
  </code></pre>
  
  <p>This works fine, but the problem is that the files from our project do not get copied to the deployment folder. So in other words, it does not overwrite the files that already exist after I copied them with the <code>GetCMSFiles</code> task.</p>
  
  <p>The way I see it there are two options:</p>
  
  <ol>
  <li><p>Force the <code>CopyAllFilesToSingleFolder</code> to overwrite any existing files in the deployment folder.</p></li>
  <li><p>Have a condition in the <code>GetCMSFiles</code> task to only include files that don't already exist in the project.</p></li>
  </ol>
  
  <p>But I'm not sure whether this is possible and how to achieve this. Any ideas?</p>