简体   繁体   中英

Different version of assembly loaded from GAC

I have a typical problem of loading a dll from GAC. My application references a dll called MyAssembly.dll. Its assembly version is 1.1.6 and file version is 1.2.100 and it is added it to the GAC. After a bug fix I updated the file version to 1.2.110 (but the same assembly version as there were no changes in the binary) and deployed to the GAC and the application works fine. But for some reason when i installed the previous build (Wise Installation, obfuscated dll), my application stopped working. It gives a Missing Method Exception. if I install the build 1.2.110 (Wise installation, obfuscated dll) my application works fine. I am not sure why this strange behavior. When installing the lower version (1.2.100) on a machine where 1.2.110 is present, the dlls in the GAC are not overwritten. But when I load the dll and reads its AssemblyFileVersion attribute it says 1.2.100. But FileVersionInfo.GetVersionInfo gives me 1.2.110. Could anyone help me with solving this issue, please?

通过使用ngen.exe实用程序安装程序集解决了该问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM