if you are getting this exception "The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory' threw an exception." try to reference Microsoft.Practices.ObjectBuilder2.dll
Happy coding…