title: c# visual studio build exe with target anycpu but that determines its platform(x86/x64) on the calling process platform(x86/x64)
body: <p>We have a software in 32 and 64 bits that calls our exe and passes events to it(like a plugin).</p>
  
  <p>The thing is that our exe has to execute in the same bitness(x86/x64) as the calling software (if the software is run in 32 bits version our exe must run in 32 bits, if the software is run in 64bits version our exe must run in 64 bits). The windows version is 64bits but the client can run the software in 32bits version or 64bits version.</p>
  
  <p>In visual studio(2015) the Target AnyCPU option only depends of the windows version(+ Prefer 32-bit checkbox) but we need to be dependent on the calling software Process.</p>
  
  <p>Is there any option or solution we can implement instead of compiling to each platform (x86 and x64)?</p>