修正使用ClickOnce升级程序遇到HRESULT: 0x800736B3问题

解释方法参考微软MSDN解释

Sometime when I start my Click Once application I have an exception "The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)".
After this message, I can't restart my application, and if I uninstall with "remove program" my application doesn't uninstall.
I found many post to solve this problem, but none to describe the causes.
The only solution is to uninstall all Click Once applications (if the application wants to uninstall), deleted the folder "%userprofile%\Local Settings\Apps", and reinstall all my Click Once applications.

In my environment we use 5 Click Once applications from 180 sessions (computers and terminal server sessions), and problems occur on several computers and on different applications.

It happens spontaneously and I would like to know the cause.

I join the log file from Click Once.

参考网址:http://connect.microsoft.com/VisualStudio/feedback/details/354842/start-click-once-application-exception-hresult-0x800736b3#

为了方便使用,我写了一个BAT程序,直接执行,代码很简单,具体如下:

@echo off
cd %userprofile%\Local Settings\Apps\
rd 2.0 /s/q
@echo Remove old version done. Please click any key to continue.
pause

代码下载地址:CleanOldVersion.zip

原文地址:https://www.cnblogs.com/songhaipeng/p/2546823.html