0

I am getting the classic exception

Could not load file or assembly 'XXX.Base, Version=11.0.0.0, Culture=neutral, >PublicKeyToken=xxxxxxxxx' or one of its dependencies. The located assembly's >manifest definition does not match the assembly reference. (Exception from >HRESULT: 0x80131040) The assembly D:\xxx\xxxx\xxx\bin\xxx.xxx.xxx.xxx.dll was found but could not >be loaded. It might have the same name as the referenced one but different version, >culture or public key token.

I know there are tons of these posts on SO and all over the web, but I have one question to which I have not been able to find an answer. Where else, other than web.config, does an ASP.NET get these version numbers from? In the references section of my app, the version is listed as 9.0.0.0. However, when I compile the app and put into IIS, I'm getting exceptions for the wrong version number.

I have already tried:

  • recompiling the app,
  • restarting the server,
  • restarting IIS,
  • clearing the ASP.NET temp files
  • restarting the app pool,
  • putting a newly recompiled version of the app onto the server,
  • checking the web.config (I can't even find some of these dlls referenced at all in the web.config file)
  • checking the packages.config file (it's not in here either)

Are there any other spots where these references are stored? I know that in visual studio I can expand references, but I'm assuming that list is stored in a file somewhere and I'm wondering where that file might be?

Where does my app get the idea that it needs version 11.0.0.0 of the assembly when it's listed as 9.0.0.0 in references?

Jester
  • 56,577
  • 4
  • 81
  • 125
hexagod
  • 449
  • 3
  • 15
  • It could be a dependency of another referenced dll. [Enable assembly resolution debugging](https://stackoverflow.com/q/255669/547981), that will probably tell you why it wants to load the dll. – Jester Aug 05 '19 at 15:12
  • ok thanks @Jester. I think it was actually in one of the other dlls because we deleted all of the application dlls, recompiled and used only the dlls that were necessary and the app is working again. That tool you posted looks pretty handy for if this happens in the future. Somehow one of the v11 dlls must have gotten mixed in and it was requesting version 11 on all the others as a result. – hexagod Aug 05 '19 at 17:27

0 Answers0