Hi,
I got this error while working on Data Access Logic components using the Enterprise Library.
The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory' threw an exception.
I searched everywhere and found nothing but some fragmented advice related to medium trust. The actual problem was that I had a reference to:
Microsoft.Practices.EnterpriseLibrary.Data.dll Microsoft.Practices.EnterpriseLibrary.Common.dll
...but I also needed a reference to:
Microsoft.Practices.EnterpriseLibrary.ObjectBuilder.dll
Reflection is at work here, so the compiler didn't catch the missing reference. I thought I'd post here to hopefully save someone else the trouble.
.NET Development18
|