tags:

views:

1312

answers:

7

We developed a C#.Net application using .Net Framework 2.0 which works fine in 32 bit Computers. But when I am run my application in 64 Bit environment, it crashes.

I need to make my application to run on 64 Bit environment.

How do I do this?

A: 

It should just run unless you're referencing libraries that are specifically only available for 32bit (Jet DB drivers are one example) or unless you've told your compiler to compile your application to 32bit only.

What does the crash say?

rein
If the compiler is told to compile to 32 bit only, then in fact it *should* work, and is in fact probably an acceptable fix for the problem.
harms
+3  A: 

In the build settings for you project set the platform target to x86 instead of Any CPU. This will solve problems where your project has "hidden" dependendencies on 32 bit subsystems that are not available in 64 bit. Your application will then run in the 32 bit susbsystem on 64 bit Windows.

Martin Liversage
+3  A: 

You could compile it for x86 instead of any cpu that way it will run against 32bit librarys on a 64bit windows.

Or swap 32bit librarys for 64bit when installning on 64bit windows. Among other some Sqlite dlls are specific for 32/64 bit

Fredrik Leijon
+1  A: 

I faced the same problem. I my case it was enough to compile the main assembly (.exe) of my application especially for "x86". The other assemblies (.dll) are compiled with "Any CPU".

Our application then works fine on 32Bit and 64Bit systems.

Jehof
A: 

If you are on Windows you shall use CorFlags Conversion Tool (CorFlags.exe). This way you might enforce application/dll's to run in 32/64 bit space. Details and examples of use are available at http://msdn.microsoft.com/en-us/library/ms164699(VS.80).aspx.

Libor
A: 

Is it windows/asp.net application ?

If it is an asp.net application. you can run only 32/64 bit modes at the same time. for doing this,

Case 1. you need to enable32bitappln on the application pool in the IIS. then reset the iis.

Case 2. Check for the corresponding DLL in regedit.

if it is windows based. run this commande,

CoreFlags.exe TheApp.exe /32BIT+ //Enables 32 bit appln.

jeneesh k. velayudhan