views:

181

answers:

4

Hey everyone,

I have created an application in VS C# Express 2008 using Windows 7 as my OS. It runs perfectly fine on other W7 machines, but when we try and deploy it on a machine with XP it doesn't even run. I just get the usual "Application needs to be terminated" error message. The app was built using .NET 3.5 and all the machines have at least 3.5 installed. Is there anything that I may be able to do to get the program running in previous versions? Thanks in advance for your help.

Updated Info. The machines all use x86 32-bit OS, either XP SP3 or W7, so I don't think that there is a huge need for checks for 64-bit issues. The application itself is loading images into an image list and adding in an image when it finds a break in the file names. (eg. There are 4 images in a folder, 1-3 and 5, what the application does is iterates through each image name and the minute it sees that image 4 is missing, it adds a placeholder image and labels it image 4.)

A: 

Log the exception which is thrown by the application so that you can fix it.

Giorgi
If the exception is thrown during loading of the (primary) DLLs it's not easy to catch.
Henk Holterman
+4  A: 

You should set up an UnhandledExceptionEventHandler so that you can log information about the current state of your application and the exception information. It isn't going to stop your application from crashing, but it will give you more information about what happened and make it easier on your end user to give you what you need to know when the application crashes.

This article give a good description of how to do that.

unholysampler
Thank you for the article. This will at least be able to help me figure out what may be causing the issue.
Seb
After implementing the UnhandledExceptionEventHandler, it helped me see that one of my DLLs weren't being loaded in. After further inspection I noticed that they were not being packed into the installer so I had to manually insert it in. Thanks for the help.
Seb
A: 

Not a lot of info but some things to check:

Make sure you have the latest patches on XP and SP release

Maybe you need to run the program as administrator - are you logging in as admin

Have you checked the windows appliation error log to see if there is anything there that might be helpful

RJ
A: 

First you must be sure that .Net Framework 3.5 is installed on your Windows XP machine. If everything is OK, then you should check if you are using "3rd party dlls as reference" and validate their existence and correct versions on your Windows XP machine.

Probably this can help.

Mario