I made a program with Visual Studio 2010. It required .NET Framework 4.0 to run, and the machine it needs to run on is not connected to the internet, so I found the redistributable online on my own machine and copied it over.
I installed the software on the machine (it’s a very simple program, I just made up an installer to do the .NET installation as well as putting the .exe file of my program into Program Files) but any time I try to run it, I get a Windows Error Report message saying the program failed to run.
Are there any suggestions as to where I could look for the cause of this issue?
(If it matters, the machine I’m trying to run it on is running Windows XP while I am running Windows 7. I don’t think this is a compatibility issue though…)
The problem you’re having is with error handling. There is probably an environmental issue such as a missing folder, registry setting, or some other configuration. That would explain why it works on your dev machine and not the other (a common occurrence.) Your app is throwing an unhandled exception and crashing.
There may be information on the error in the Application log, including a stacktrace you can use to diagnose the issue. Once you have determined the problem, you will also want to ensure that you have sufficient exception handling so you can raise friendly error messages and prevent your app from crashing.