Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

32-bit C# program won't run on Vista 64-bit

Posted on 2009-02-11
3
Medium Priority
?
1,332 Views
Last Modified: 2012-08-14
I have a C# program written using VS 2008 Express edition on a XP 32-bit machine.  When my Vista 64-bit users try to run the program, it crashes before even displaying the splash screen.

Is there something I have to do to get this to run in Vista 64-bit?
0
Comment
Question by:rmmarsh
  • 2
3 Comments
 
LVL 41

Accepted Solution

by:
graye earned 2000 total points
ID: 23613576
The default setting for VS2008 is to use the "AnyCPU" setting which allows programs to run as 32-bit on a 32-bit PC and runs as 64-bit on a 64-bit PC.    
However, there are a few "gotcha's" to be aware of...   For example, a 64-bit application can't connect to a Microsoft Access MDB file (or an Excel XLS file).   Likewise calls to the Windows APIs need to be more precisely defined.
So, to solve the problem (either permanetly, or temporarily while hunting down coding errors), I'd suggest that you recompile the application using the "x86" flag instead of "AnyCPU".
0
 
LVL 41

Assisted Solution

by:graye
graye earned 2000 total points
ID: 23613636
oops, I had forgotten that the Express Edition doesn't have a convienent way to switch between compile "targets".
here is an article that shows how to edit the *.vbproj file by hand (via notepad) to change the target from AnyCPU to x86
http://www.onteorasoftware.com/post/Changing-the-target-cpu-in-VB-express-2008.aspx 
0
 

Author Closing Comment

by:rmmarsh
ID: 31546416
Thank you so much... that did the trick!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The main issue when installing Vista and XP in dual boot is when you have to reinstall any of the two when something fails, let's say a hard disk failure, a lost partition, virus, etc. What commonly happens is that you lose all your hard work config…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses
Course of the Month20 days, 23 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question