1

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Petr Havlicek
  • 2,051
  • 1
  • 19
  • 25

2 Answers2

2

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.

Community
  • 1
  • 1
0

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

Irek
  • 83
  • 1
  • 5