Hello,
I've implemented an application in c# and before publishing it, I've executed it and I didn't find any problem although, after publishing I've tried to execute the exe file locate in start/programs menu and it starts but suddenly in less than a second it stops and the Windows Forms window dissapear.
I've executed the executable generated in /Debug folder and it works fine, I only have problems with the published solution and the one located in /Publish folder.
Do you know what is happening?
Many thanks
Jesús.
Loading
Sam HobbsPosted Mar 16, 2010, 3:08 PM
The best thing to do is to go through the program and ensure that it is checking for errors everywhere that an error can occur. In othe words, use try/catch everywhere there might be an error. Ensure you issue a useful error message before exiting due to errors. Some programmers use a catch block to ignore errors and then they have difficulty diagnosing problems. If the problem still occurs eventhough you catch all possible errors, then you can add a log file that can be used in a release build to trace what is happening. There is nothing special needed for that; just add a file that you write to from places in your program to diagnose where the program fails. You might need to Flush the file each time you write to it.