@Tim J Because if you have both the 32bit and 64bit CopyFileStep files in the Build Automation, the Build pass executes both of them.
It seems there is an easier way than manually moving the 32bit/64bit "Copy Files steps".
An example for Windows - in a situation where you want to add 32Bit or 64Bit .dll's:
Build Settings -> Windows -> Build: PostBuildSteps
- CopyZlib_Setup (Script, Source see below; needs to be above the next two steps)
- CopyZlib_32Bit (CopyFile Step, which adds the 32Bit .dll)
- CopyZlib_64Bit (CopyFile Step, which adds the 64Bit .dll)
PropertyValue("CopyZlib_32Bit.Applies to") = "3" 'None
PropertyValue("CopyZlib_64Bit.Applies to") = "3" 'None
'Enable depending on CurrentBuildTarget
select case CurrentBuildTarget
case 3 'Windows 32Bit
PropertyValue("CopyZlib_32Bit.Applies to") = "0" 'Both Debug and Release
case 19 'Windows 64Bit
PropertyValue("CopyZlib_64Bit.Applies to") = "0" 'Both Debug and Release
This will dis/enable the CopyFile Steps depending on the CurrentBuildTarget.
So you can leave both 32Bit/64Bit Copy File Steps in the PostBuild section - and they will get activated depending on the current Build Settings.
Note: This won't work for 2011r3, as the "Applies to: None" has been introduced somewhen later... It's there in 2016r3.