Could not load file or assembly 'Autofac, Version=3.0.0.0

9

I am trying to connect enFinder file manager to my asp.net project with this connector. I added Autofac Version 3. Afterwards I removed the reference and added a reference to Autofac 2.6. Now the following error occurs:

Could not load file or assembly 'Autofac, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

How can I fix this problem?

asp.net
autofac
asked on Stack Overflow Oct 2, 2013 by Alex • edited Jan 11, 2015 by Marc

1 Answer

16

Delete all Autofac references in your project and add them again, using the correct Autofac DLL. The mismatch occurs when the reference you've added to your project via the Add Reference menu is not the same version as the actual file. This happens when you exchange the physical DLL file on your disk to which the reference in your project points.

answered on Stack Overflow Oct 2, 2013 by Marc • edited Oct 25, 2018 by Marc

User contributions licensed under CC BY-SA 3.0