Feiga Lubow
Feiga Lubow

Reputation: 332

Matching application in C# that built on 64-bit system to running on 32-bit system

I developed a c# program on computer with 64x-bit system and the program ran perfectly,but when I try to ran it on 32x-bit system I got the error: "this app can't run on your PC", what I need to change or add in the code to match it to run on 32x-bit system?

Upvotes: 0

Views: 105

Answers (1)

Joel Coehoorn
Joel Coehoorn

Reputation: 415610

Change the Platform Target in the Visual Studio project settings to Any CPU or x86.

64-bit CPUs can run 32-bit (x86) programs, but the reverse is not true. Additionally, the Any CPU option allows the jitter on each individual machine to choose the best option for that machine.

However, you also need to check through any third-partly libraries in your application. If you took a dependency on a library or reference an assemply (dll) that is compiled for one specific platform, that will limit your options to what is supported by that assembly.

Finally, make sure the target PC actually has the right version of the .Net Framework installed.

Upvotes: 3

Related Questions