Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T.

Here's another problem I had when trying to get the Microsoft Enterprise Library - exception logging working.

The following error was caused because I did not add references to all the assemblies used.
 
MyApp.UnitTests.BuildHelperTests.DBConnectionString_Get : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingException : The type 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.
  ----> System.ArgumentException : The type 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.

In this case I needed to add reference to Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll. 

Also, when unit testing my app, VS did not copy this (and a couple of other assemblies) from the original code project to the unit test project - so the solution here was to add a post build event to copy them across to the unit test target (bin/debug) dir.

HTH

 Tim

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


Comments on this post: .Net Error: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingException : The type '... .LoggingExceptionHandler..' cannot be resolved.

# re: .Net Error: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingException : The type '... .LoggingExcep
Requesting Gravatar...
It's probably because you haven't got Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll in you're bin directory of your project.
Left by Mark on Jan 24, 2008 9:56 AM

# re: .Net Error: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingException : The type '... .LoggingExcep
Requesting Gravatar...
Hi Mark, thanks alot, for the clarification..
Left by Niranjan Kumar D on Mar 24, 2009 4:53 PM

Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net