I am writing a C# application using Visual Studio 2015. This application targets "Any CPU" (without the "Prefer 32-bit" option enabled), meaning that the application compiles to a single build target that will run in 32-bit mode on 32-bit operating systems and 64-bit mode on 64-bit operating systems.
This application requires that a certain native DLL be copied to its output folder (i.e., the bin/Debug or bin/Release folder). There are separate x86 and x64 versions of this DLL, and the correct one needs to be copied to the output folder depending on the developer's operating system.
So far I've figured out that I can copy files to the output folder conditionally by adding something like the following to my .csproj file:
<ItemGroup Condition="MY CONDITION HERE">
<Content Include="MyNativeLib.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
So my question is, how do I write a condition equivalent to "developer's operating system is x86" or "... x64"?
(To be super clear, I'm not asking how to copy a file conditionally upon the platform build target, which in my case is always "Any CPU". I'm asking how to copy a file conditionally depending on the OS architecture on which Visual Studio happens to be running.)