WPF application crash after ClickOnce publish

一个人想着一个人 提交于 2020-01-13 11:21:18

问题


I have a problem with ClickOnce publishing of a WPF application.

  • If the application is built (debug or release), it is running correctly.

  • Application published by ClickOnce crashes.

I tried to change Target Platform. Sometimes this change helps to solve problems, but not every time (1 of 20 cases).

I have Visual Studio 2008 and the project has been upgraded from Visual Studio 2005.

Any ideas?

Thank you in advance!


回答1:


On the machine where the application is installed, drill down in the user profile to the ClickOnce cache, and look for the cached application files. The folder will have the exe and all of the assemblies, etc., in it. Our winform app creates two folders, xxxx_tion is the one the application runs from.

Find the exe file and double-click on it to run it. This essentially runs the application without the ClickOnce-ness of it all. If it crashes, then it is not a ClickOnce problem per se, it is a problem with your application.

I would check and make sure you are deploying all of the files you need, you don't have references to multiple versions of the same dll, you don't have circular references, etc.

Good luck, RobinDotNet




回答2:


There is a long discussion on http://social.msdn.microsoft.com/forums/en-US/wpf/thread/3e6909ef-2ab1-4b77-8bc2-796c065a6219/

Solution that worked for me (send by pindurav on page above):

  • I rebuild whole solution
  • close visual studio
  • open visual studio, open project and directly publish without building.

= no app.xaml exception



来源:https://stackoverflow.com/questions/2420280/wpf-application-crash-after-clickonce-publish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!