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

Patrick
  • 3,073
  • 2
  • 22
  • 60
  • Possibly not. I am willing to know what are the drawbacks of my company's choice of using always X86. – Patrick Oct 14 '15 at 08: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 '15 at 08:45
  • Ok I will read it all more thoroughly. – Patrick Oct 14 '15 at 08: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 '15 at 08: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 '15 at 07:08

1 Answers1

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.

Rahvin47
  • 91
  • 5