title: Copy linked content files at each build using MSBuild with certain constraints
body: <p>I am using Sharing files with Visual Studio's linked files concept. So I need to do Copy linked content files at each build using MSBuild.</p>
  
  <p>For doing that I have written this code in my .vbproj file inside Project tag.</p>
  
  <pre><code> &lt;Target Name="CopyLinkedContentFiles" BeforeTargets="Build"&gt;
   &lt;Copy SourceFiles="%(Content.Identity)" DestinationFiles=(Content.Identity)" 
   SkipUnchangedFiles="true" OverwriteReadOnlyFiles="true" 
   Condition="'@(AllFiles)' != ''" /&gt;
   &lt;/Target&gt;
  </code></pre>
  
  <p>and it's working fine. all the linked files are being copied.</p>
  
  <p><strong>But here I need to add certain constraints e.g. 'not copying files with .vb 
   extension'</strong> . How to achieve that ?</p>
  
  <p>I have tried this code </p>
  
  <pre><code> &lt;Target Name="CopyLinkedContentFiles" BeforeTargets="Build"&gt;
  
   &lt;CreateItem Include="%(Content.Identity)"&gt;
      &lt;Output ItemName="AllFiles" TaskParameter="Include" /&gt;
   &lt;/CreateItem&gt;
  
   &lt;ItemGroup&gt;
     &lt;AllFiles Remove="@(AllFiles)" Condition="'%(Extension)' == '.vb'"/&gt;
    &lt;/ItemGroup&gt;
  
    &lt;Copy SourceFiles="@(AllFiles)" DestinationFiles="@(AllFiles)" 
       SkipUnchangedFiles="true" OverwriteReadOnlyFiles="true" 
       Condition="'@(AllFiles)' != ''" /&gt;
    &lt;/Target&gt;   
  </code></pre>
  
  <p>Its not working.No file is being copied.Please suggest any idea.                     </p>