Getting error while trying to use Exception Handling block of Enterprise Library.
The problem
The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyImpl, DefaultPolicy]) failed: The type 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be resolved. Please verify the spelling is correct or that the full type name is provided. (Strategy type ConfiguredObjectStrategy, index 2)
The solution
Add following dlls as reference
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging
Microsoft.Practices.EnterpriseLibrary.Logging
The ExceptionHandling.Logging dll is must to use ExceptionHandling as while logging the exception, Exception handling block use this .dll.
In some cases for windows services or console applications, you will need to explicitly refer the exception handling blocks into services or console application projects.
Thank you
Regards,
Sheo Narayan, Microsoft MVP
230+ ASP.NET Tips and Tricks - http://www.itfunda.com/Howto
Reply |
Reply with attachment |
Alert Moderator