Reputation: 377
The Exception is
Exception: Could not load file or assembly 'Autofac, Version=2.5.1.827, 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)
The version of 'Autofac' dll that is added to project is 2.5.1.827.But still getting above error.
Upvotes: 2
Views: 3681
Reputation: 1
Sometime,all Dlls are not copied into some specific bin folder.See the warning and add the required Dlls in the specific folder which are described in warnings.
Upvotes: 0
Reputation: 671
May be you add Autofac.Contrib assembly that reference to different version of Castle.Core
I faced with this issue when add reference to AutofacContrib.DynamicProxy2, this assembly reference to old version of Castle.Core while I add newest version of Castle.Core.
I solved it by copy code of AutofacContrib.DynamicProxy2 to my solution (just 2 files) and it work perfectly.
Upvotes: 0
Reputation: 26018
I ran into the same issue as you. My PC shut down unexpectedly and after rebooting I ran into this error when running my application. I was using using Autofac in a ASP.NET MVC3 application.
I cleared my temporary ASP.NET files
(C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files) and restart IIS and everything was cool.
Upvotes: 0
Reputation: 10855
Enable Fusion logging to assist in seeing which Assemblies are being loaded. You can find many articles and blogs on doing this:
How to enable assembly bind failure logging (Fusion) in .NET
http://blogs.msdn.com/b/thottams/archive/2007/06/02/debugging-load-problems-using-fusion-log.aspx
Upvotes: 2