After upgrading a component I began getting the following error:
Could not load file or assembly 'ComponentArt.Web.UI, Version=2006.2.1507.2, Culture=neutral, PublicKeyToken=9bc9f846553156bb' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Solution:
The problem was with the manifest reporting I needed version ...1507.2 of the file when in fact I had version Version ...1507.3 of the file in the bin directory. The ...1507.3 version of the file was both in the Main projects references correctly and in the dependent project references correctly. Nowhere did it show as the old version--though the day before I had the previous version in stalled and I overwrote the dll with the newer one. I assumed something was cached somewhere.
I used advice from the following two urls to help:
http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspxI did the following the following to solve my problem:
http://blogs.msdn.com/junfeng/archive/2004/03/25/95826.aspx
- I updated the registry key [HKLM\Software\Microsoft\Fusion\LogFailures] (DWORD) to 1 -- This required me setting permissions on the Fusion key so that I could even see the LogFailures value (which was already there and set to 1).
- I ran my application in debug mode and got a much more helpful error message: Which pointed to a dependency project even though the error was reported in the main project.
- Though the dependent project appeared to have the dll registered correctly, I had to remove the 'obj' directory from it and from the main project and recompile to get rid of all of the cached pointers to the old dll.
No comments:
Post a Comment