Could not load file or assembly Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF

Topics: Exception Handling Application Block
Dec 3, 2012 at 4:40 AM

mracharjya wrote:


I am getting the below error after implimenting the Entlib5.0 with WCF.

An error occurred creating the configuration section handler for exceptionHandling: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Could you please help me out on this?

Dec 3, 2012 at 4:48 AM

The manifest definition message means that an assembly was found but the version or PublicKeyToken were incorrect.  A usual cause would be having a different  version of Enterprise Library installed or deployed (e.g. Version=5.0.505.0).  Another common cause would be using a custom build of Enterprise Library that does not have a PublicKeyToken.

So, check the version and key of all the assemblies that are deployed with the application.  Also, you could try using Fuslogvw.exe (Assembly Binding Log Viewer) to pinpoint where the problem is.

Randy Levy
Enterprise Library support engineer