1

i just finished developping a WPF application on visual studio. I want to deploy it with ClickOnce to allow other users to use this application. I tried to deploy it, so I installed the app on my computer but i can't run it. The app doesnt even open, it seems to instant crash when executing. The app works fine in Visual Studio, but doesnt work when deployed.

Is there a way to debug the app after it is deployed? Or is there any other better way to deploy the app?

Thanks

Axel
  • 165
  • 3
  • 14
  • This happens to me all the time with new apps. Get your environment perfect on your machine and everything works great. Then move to other computers and bam nothing works. In my case it's usually third party libraries not copying over or licensing for third party libraries. – Felix Castor Jan 06 '20 at 13:59
  • What's your solution in these cases? – Axel Jan 06 '20 at 14:01
  • first check that all the application files are there; Project Properties > Publish> Click Application Files. Another thing you can do is add a method to the App.xaml.cs file to handle `DispatcherUnhandledException`. That is where all unhandled exceptions go. Have to write the stacktrace to a file though, a message box doesn't seem to hold the thread there. – Felix Castor Jan 06 '20 at 21:53

1 Answers1

4

You can use dnSpy to debug a compiled application.

Hopefully this will catch an exception and give you a clue of where to go.

https://github.com/0xd4d/dnSpy

or straight to the releases.

https://github.com/0xd4d/dnSpy/releases

Ryan Thomas
  • 1,724
  • 2
  • 14
  • 27