Reputation: 13434
I am working with c# windows form application and i am using mysql as backend. i created setup for my project by giving target platform property as x64. when i install my application in windows 7 64bit OS it installed perfectly without error. but when i open the installed application it cant open ,its shows "Windows closing the application". what is the solution for my problem. Eventhough i didnt install mysql driver.
I have another c# windows form application with DirectX without have any backend, this application also have same problem
Thanks in Advance
Upvotes: 2
Views: 3081
Reputation: 106826
Chances are that the source of your problem is that you application is running as a 64 bit process but it has some dependency on a component that is only available in 32 bit. This is not unexpected when you depend on DirectX. MySQL I'm not so sure about.
When you build your project you decide which platform you want to target. You do that in the settings for your project in Visual Studio.
You have four choices:
Upvotes: 0
Reputation: 1500504
Here are the diagnosis steps I'd go through:
Check the event log. If the CLR has failed to load your application to start with, there may be something in there.
Try using the Fusion Log Viewer to see what's happening in terms of assembly binding.
Does the MySQL driver you're using have separate 32 and 64 bit DLLs, and are you sure you're installing the right one?
Are you able to test this without going through a full installation (i.e. build and run on a Win7 x64 box without the installer part)?
Does it still fail if you build for "Any CPU"? Or is there some specific reason why you can't do that?
Does it fail if you build for x86, which should still work fine on an x64 box? (Unless you really need to take advantage of lots of memory in your app, there can be some performance benefits to running the x86 CLR, particularly in terms of memory as every reference is half the size.)
If you create a small "test app" which doesn't use MySQL, does that fail?
Can you write a tiny console application which does use MySQL, and make that fail, thus showing a minimal amount of "user" code required to provoke the failure?
Upvotes: 2