title: MSBuild - copy files based on platform
body: <p>I have some native dlls that come in 2 flavors - built for x86 and x64. Based on my project platform configuration, I would like to copy the right dlls into the folder.</p>
  
  <p>What I tried</p>
  
  <pre><code>&lt;ItemGroup&gt;
      &lt;_nativex86 Include="native\myNativex86folder\*.*" /&gt;
      &lt;_nativex64 Include="native\myNativex64folder\*.*  /&gt;
  &lt;/ItemGroup&gt;
  
  &lt;Target Name="AfterBuild"&gt;
      &lt;Copy Condition="$(Platform) == x86"
          SourceFiles = "$(_nativex86)"
          DestinationFolder = "$(OutputPath)native" /&gt;
      &lt;Copy Condition="$(Platform) == x64"
          SourceFiles = "$(_nativex64)"
          DestinationFolder = "$(OutputPath)native" /&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>However, nothing gets copied. What could I do?</p>