Tutorial :C# app runs in Windows 7, but not in Windows XP



Question:

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.)


Solution:1

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.


Solution:2

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.


Solution:3

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


Solution:4

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »