0

I developed a c# program that mainly shows data taken from a sql server. After deploying it if I install the program on a different computer as soon as I run it I get the error "Program stopped working":

Files that help describe the problem:
C:\Users\Paolo\AppData\Local\Temp\WER25D7.tmp.WERInternalMetadata.xml
C:\Users\Paolo\AppData\Local\Temp\WER3EE4.tmp.appcompat.txt
C:\Users\Paolo\AppData\Local\Temp\WER3EE5.tmp.mdmp

If I install the program on the same computer where I developed the app it works fine. I tried on different computers but it always doesn't work. I noticed that in my deployed folder there isn't any dll file or other library files, is it normal? There are only these files:

icon.ico.deploy
app name clickonce application
app name.exe.config.deploy
app name.exe.deploy
app name.exe.manifest
pindol
  • 2,110
  • 6
  • 35
  • 52
  • Have you tried doing [Remote debugging](http://msdn.microsoft.com/en-us/library/y7f5zaaa.aspx)? – mason Mar 26 '14 at 23:31
  • No but I can't do it because the computer where the program must run is not in my house and I have no way to connect it on my lan. I need to install the program to the other computer using a usb key – pindol Mar 26 '14 at 23:32
  • Have you tried installing it, just as a test, on another computer that is on your network to verify that works? – mason Mar 26 '14 at 23:38
  • I can't try it now. If it will works what does it mean? – pindol Mar 26 '14 at 23:45
  • Well it's hard to know for sure. But the best guess based on what you've said is that you've done something in your program that only works well on your development environment. Therefore, if you do remote debugging you may be able to spot what that is and take corrective action. If you can't do remote debugging, then implement proper logging in your code so that you can find the problem. – mason Mar 26 '14 at 23:54
  • I have no time to do remote debugging because as soon as i run the program i get the error "Program stopped working" – pindol Mar 27 '14 at 00:18
  • 3
    Then implement better logging. See [Error Logging in C#](http://stackoverflow.com/questions/147557/error-logging-in-c-sharp). – mason Mar 27 '14 at 00:19
  • Clearly you have an unhandled exception, the details of which you will only know through a log. Given your dependence on SQL Server, I'm guessing your installation did not set it up correctly, a database is missing, or something like that. – BradleyDotNET Mar 27 '14 at 01:13
  • I use SqlConnection, SqlCommand and some other classes like these. Do I have to include any library when i deploy the program? – pindol Mar 27 '14 at 08:52
  • I'm trying to set log it looks like i found the problem. Thanks – pindol Mar 27 '14 at 09:17

0 Answers0