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?
0
votes
The AssemblyFileVersion plays no role whatsoever, only the AssemblyVersion matters. So this is entirely expected. Increment your AssemblyVersion when you make breaking changes so this can't go wrong.
– Hans Passant
Thanks Hans. But there are no breaking changes between 1.2.100 and 1.2.110. 1.2.110 has only a fix in a method. As I mentioned in the question when i installed the 1.2.100 (Wise Installation, obfuscated dll) on a machine where 1.2.110 was already installed my application stopped working. It gives a Missing Method Exception. This is where I got stuck.
– Ram
That sounds like a breaking change to me :)
– Hans Passant