Geeks With Blogs
Tim Huffam Dotting the I and crossing the T of I.T.

The following error was caused because of referencing unsigned (not strongly typed) assemblies - in my case because I was using assemblies from the Enterprise library source/working dir (C:\EntLib3Src\App Blocks\bin) instead of from the main Enterprise Library install dir (C:\Program Files\Microsoft Enterprise Library 3.1 - May 2007\Bin):
 
MyApp.UnitTests.BuildHelperTests.DBConnectionString_Get : System.Configuration.ConfigurationErrorsException : An error occurred creating the configuration section handler for exceptionHandling: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (c:\temp\nunit\MyApp.UnitTests\MyApp.UnitTests.dll.config line 5)
  ----> System.IO.FileLoadException : Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

The solution is to remove the incorrect assembly references and add the correct ones.  Kind of obvious - when you know what to look for.

Tim

Posted on Monday, August 27, 2007 4:16 AM C# .NET , ASP.NET | Back to top


Comments on this post: .NET Error: System.Configuration.ConfigurationErrorsException : An error occurred creating the configuration section handler for exceptionHandling: Could not load file or assembly

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net