问题描述
我在ClickOnce发布WPF应用程序时遇到问题。
I have a problem with ClickOnce publishing of a WPF application.
-
如果该应用程序已构建(调试或发布) ,它可以正常运行。
If the application is built (debug or release), it is running correctly.
ClickOnce发布的应用程序崩溃。
Application published by ClickOnce crashes.
我尝试更改目标平台。有时,此更改有助于解决问题,但并非每次都能解决(20个案例中的1个)。
I tried to change Target Platform. Sometimes this change helps to solve problems, but not every time (1 of 20 cases).
我有Visual Studio 2008,该项目已从Visual Studio 2005升级。
I have Visual Studio 2008 and the project has been upgraded from Visual Studio 2005.
有什么想法吗?
谢谢!
推荐答案
在安装了应用程序的计算机上,在用户配置文件中深入到ClickOnce缓存,然后查找缓存的应用程序文件。该文件夹中将包含exe和所有程序集等。我们的winform应用程序创建了两个文件夹,xxxx_tion是应用程序运行的文件夹。
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.
找到exe文件并双击运行它。这实际上在没有所有ClickOnce-ness的情况下运行应用程序。如果崩溃了,那么本质上这不是ClickOnce问题,而是您的应用程序有问题。
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.
我将检查并确保您正在部署所有文件您需要,没有对同一个dll的多个版本的引用,没有循环引用等。
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.
祝您好运,
RobinDotNet
Good luck,RobinDotNet
这篇关于ClickOnce发布后WPF应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!