I have developed a windows application using (visual Studio). I have just recently installed it on a 64 bit machine, it installed perfectly but when I try and run the application I get an error of something like : ”The program cannot load” (I havent got the 64 bit machine with me at the moment
My development machine is 32 bit so it runs perfectly fine on this so I am unable to debug.
I am hoping that someone is able to offer some advice on this as all my users will soon be upgraded to 64 bit.
Thanks in advance.
C#Microsoft Development
Last Comment
SmashAndGrab
8/22/2022 - Mon
p_davis
did you register your assemblies?
Éric Moreau
Is the correct .Net framework installed on this computer? have you deployed any references? Try to build a simple application that shows up a dummy form instead of a more complex application.
AndyAinscow
I guess you have a third party component that is 32 bit. The default settings of the solution you compiled (any CPU) would make it run as 64 bit on a 64 bit machine - which then doesn't run because part of it is 32 bit. If I am correct then you need to change the target to x86.
Apologies - I am fairly new to win forms - could you explain how I would do this please?
Thanks
AndyAinscow
>>But I still get the same error:
The error you show as a screen shot is very different than in the body of your question. Please change it back to 'Any CPU' and confirm it is the same error. If it is a different error please post a screen shot of that error message.
Andy - Is there a way of me finding out what the issue is?
Eric - I am currently in the process of creating a new simple project.
The 64 bit machine is a new build - not exactly sure what framework it will have - probably whatever the latest one is.
What do you mean about deploying references? What do I need to do?
I normally just build the project - it then creates a setup.msi .
I then install the setup.msi on the machine.
This works perfectly well on 32 bit machines but when I install on a 64bit I get the above error.
of course, it may not be the fact that its a 64 bit - I'm guessing it could be anything.
Hoping that someone can help?
AndyAinscow
>>Andy - Is there a way of me finding out what the issue is?
This sounds rather like a run time error. They aren't so easy to track down.
I'd follow the advice from Eric first, if it is something you need to install then get that sorted out first.
Éric Moreau
>>What do you mean about deploying references?
If you are using 3rd party controls/components, they need to be part of your .msi. Some, like Office, cannot be part of your .msi so it requires a separate installation.
Which OS have you installed? Which .Net framework is your project targeting?
I have created a new simple blank application (testApp.exe) and it runs without issue on the 64 bit machine.
I'm not sure if its a fair test as the original app has a setup.
The OS i use is Windows 7 SP 1. See screenshot:
The 64 bit OS also Win 7 SP1. See Screenshot:
this is the .Net framework on the 64 bit machine:
AndyAinscow
Have a look at your problem app and see what controls it uses.
Can you add one of each to this test app you now have and see if it still starts without problems.
Éric Moreau
So because your test application ran without issues (no matter how it is deployed), the problem lies in one of the references. What do you have under the References of your project? Are they all in your deployment package? Have you tried to take the Bin folder (debug or release depending on you build your final application) and copy it as-is to the 64-bits system just as a test?
Not the setup project. What are the references under your application's project?
SmashAndGrab
ASKER
Apologies..
Éric Moreau
I see SAP in your references (and I am not used to it). What are the requirements to deploy SAP?
Have you tried to take the Bin folder (debug or release depending on you build your final application) and copy it as-is to the 64-bits system just as a test?
"Have you tried to take the Bin folder (debug or release depending on you build your final application) and copy it as-is to the 64-bits system just as a test? "
Can you explain what you mean here? I can test it when I know what you mean. :)
Thanks
Stuart
Éric Moreau
The result of the compilation is sent to the bin folder (debug or release). Copy the all the files in the same folder as your application .exe to the 64-bits computer (plain old copy - not install) and double the .exe from there. Is that working?
SmashAndGrab
ASKER
Hi Eric,
This folder:
It is currently copying to the 64 bit machine as we speak.
I think I have found the issue. Its to do with the database that this application is using.
It uses an Access Database and uses ODBC drivers.
AndyAinscow
>>It uses an Access Database and uses ODBC drivers.
Is the access a 32 bit or (hopefully not) a 64 bit version? You could try changing to oledb drivers and see if that makes a difference.
You could make a small app that makes a connection to the DB, check that you can get that to run and then see if there is a difference in your settings between the two (test and real) apps.