0

I am a C# programmer. In my company we develop a program that, with a single executable, is deployed on various machines. My boss says that the only way to do that is to make a X86 executable that if working on X86 machines will surely work on X64 too. So I would like to know: is this the correct? And what are the drawbacks of having the same exe working on X86/X64. In any case what's the AnyCpu setting for.

Additionally since most of the IT companies diversify in X86/X64 wouldn't it be better?

Thanks Patrick

5
  • Possibly not. I am willing to know what are the drawbacks of my company's choice of using always X86.
    – Patrick
    Oct 14, 2015 at 8:41
  • You asked at least 3 questions, and that link answers 2 of them directly, the last (is this the correct) is depends on your program and what libraries it uses / assumptions it makes.
    – Amit
    Oct 14, 2015 at 8:45
  • Ok I will read it all more thoroughly.
    – Patrick
    Oct 14, 2015 at 8:49
  • Do you need the extra memory that x64 allows you to address? If not, there's no real need to target x64 at all and x86 is fine.
    – spender
    Oct 14, 2015 at 8:50
  • @Spender Thank you for this information. Could you tell me something more about this? I have to handle one (or more) shape with 10^6 point. So a huge polylinesegment. And my goal is going for speed. As I told you I am not aware of the target computer that can be old and slow or viceversa.
    – Patrick
    Oct 15, 2015 at 7:08

1 Answer 1

1

In the build/debug options in Visual Studio you can select Any CPU in the Platform target. This makes sure your exe can run on both. For programming: Make sure you check the operating system version in your code when accessing the registry.

2
  • Thanx. So what is better AnyCpu or split into X86 and X64?
    – Patrick
    Oct 14, 2015 at 8:42
  • I think Any CPU. You can allways include sections in your code to handle differences.
    – Rahvin47
    Oct 14, 2015 at 10:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.