Search code examples
c#buildvisual-studio-expresspost-build-event

How to get different output filename based on x86/x64


I am using VS2013 Express. I have my project setup to build in 32 or 64 bit, but I would like to get the .exe file when built, to include _32 or _64 depending on which platform I build for.

Not having any luck in the project properties.


Solution

  • Place the following into your post-build box in the "Build Events" section of the project's properties:

    copy /Y "$(TargetDir)$(TargetFileName)" "$(TargetName)_$(PlatformName)$(TargetExt)"

    enter image description here