CreateObject no implementation error in Microsoft. Practices. EnterpriseLibrary

When use Microsoft enterprise library, it is likely you will get an error like this

Method ‘CreateObject’ in type ‘Microsoft.Practices.EnterpriseLibrary.Validation.Instrumentation.
ValidationInstrumentationListenerCustomFactory’ from assembly ‘Microsoft.Practices.EnterpriseLibrary.Validation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ does not have an implementation.

Somebody suggested that it might be because of another version of enterprislibrary in GAC, it is possible, but in my case, I failed to reference Microsoft.Practices.ObjectBuilder.dll. It might seem to be a strange problem as the same application can run happily on some of pc, you won’t have this problem when enterprise library is installed on that pc and it is on the same version as the one used by your project.

To summarise:

The safest way is do not load enterpriselibrary into GAC, include all dlls in your project while Microsoft.Practices.ObjectBuilder.dll is not used directly by your project, it is used by other enterpriselibrary dlls.

This entry was posted on Tuesday, July 5th, 2011 at 10:22 pm and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

*