ClickOnce 從緩存中安裝舊程序集 (ClickOnce installing old assemblies from cache)


問題描述

ClickOnce 從緩存中安裝舊程序集 (ClickOnce installing old assemblies from cache)

I'm using ClickOnce for installing my application written in C#. Everything worked fine till the last update after which start of my application ends with an error saying:

  

Could not load file or assembly MyAssembly... HRESULT: 0x80131040. 

After some research I've found that there is an old version of MyAssembly located in my application's ClickOnce cache folder (C:\Documents and Settings..\Apps\2.0...). However there is an actual version in the deployment package.

I've also found this old version of MyAssembly in a standalone directory in the ClickOnce cache named after this assembly (plus some characters added).

It seems to me that for some reason ClickOnce used this old version of MyAssembly from the cache instead of the new version from the deployment package.

Uninstall/install of my application won't help.

How is this possible?


參考解法

方法 1:

I have had the same behaviour. It mentioned the problem in another question. Since then, it has happened several times for us with different applications. One strange thing is that it behaves differently on different computers. So one computer could have been updated with the new assembly while another got the old one copied.

.NET ClickOnce deployment and wrong assemblies called after updated version

This appears to be a bug in .NET framework 3.5 SP1.

See Microsoft KB 971052.

方法 2:

Make sure this old assembly is loaded. You can use DllProfiler for that.

(by Petr HavlicekFredrik StigmarkerIrek)

參考文件

  1. ClickOnce installing old assemblies from cache (CC BY-SA 3.0/4.0)

#installation #clickonce #C#






相關問題

Instal versi Firebird yang benar (32bit atau 64bit) dengan Inno Setup (Install correct version of Firebird (32bit or 64bit) with Inno Setup)

在 Ubuntu 中與 EPD python 一起安裝 NLTK (Installing NLTK alongside EPD python in Ubuntu)

INSTAL_PARSE_FAILED_NO_CERTIFICATES - 試圖在 robotsium 上測試不是我的 .apk 文件 (INSTAL_PARSE_FAILED_NO_CERTIFICATES - trying to test not my .apk file on robotium)

直截了當的回答:安裝 py2app (Straight and simple answer: installing py2app)

Sql 2008 排序規則 (Sql 2008 Collation)

Apache Ant Build 命令“拒絕訪問” (Apache Ant Build command "Access Denied")

如何在 C# 部署中包含文件? (How can I include files in a C# deployment?)

使用一個安裝程序安裝多個軟件(安裝包裝器?) (Install multiple softwares with one installer (install wrapper?))

如何獲取 Eclipse 安裝目錄的絕對路徑? (How can I get the absolute path to the Eclipse install directory?)

iPhone,如何使用objective-c為iphone安裝新字體? (Iphone,how to install new font to iphone by using objective-c?)

create-react-app 命令卡在使用 cra-template 安裝 react react-dom react-scripts (create-react-app command stuck on installing react react-dom react-scripts with cra-template)

tensorflow安裝報錯(ERROR:找不到滿足tensorflow要求的版本) (Tensorflow installation error (ERROR: Could not find a version that satisfies the requirement tensorflow))







留言討論