we are using Microsoft Enterprise Library 4.1.0.0 i our application for logging and tracing. In one case, I am getting error as:
An error occurred creating the configuration section handler for exceptionHandling: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040). (C:\Program Files\Datastream\Datastream Charting Add-In\Office2007\Thomson.Reuters.Datastream.Charting.ICAddInCore.dll.config line 4)
Below is the ICAddInCore.dll.config 4th line:
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=8ef321d56661a4cd" />
Kindly help?
Thank You...
The version of the DLL it is trying to load does not match the version in the config.
It looks like your PublicKeyToken is incorrect. The Microsoft supplied Enterprise Library PublicKeyToken is 31bf3856ad364e35.
Are you building and signing Enterprise Library your self or are you using a different version of the configuration tool? Or perhaps it's a copy and paste error?
If you are using out of the box Enterprise Library your config should be:
<section name="exceptionHandling"
type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling,
Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
If you think you really should be using PublicKeyToken=8ef321d56661a4cd
then your project is probably referencing a Microsoft signed version of Enterprise Library so you should fix that reference.
Sometimes the issue is not exactly where the error message shows. I have encountered this error various times and I still don't know how I resolved it the last time. I think I did a clean build after restarting VS.
User contributions licensed under CC BY-SA 3.0