I am using EntLib 5 for creating SqlDatabase object. I used strong named assemblies with certian Public Key.
The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Data.Database' threw an exception.
"Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)":"Microsoft.Practices.EnterpriseLibrary.Common,
Version=5.0.414.0, Culture=neutral, PublicKeyToken=null"
Previsously in GAC there were 18.104.22.168 DLL of EntLib 4 due to installation of Microsoft ESB Toolkit 2.0 which are not uninstalling directly. I uninstalled every DLLs of version 22.214.171.124 which gives me error that access denied due to some dependency, so i forcefully
deleted that DDLs through RegEdit and GAC_MSIL.
So i uninstalled USB properly through control panel, then I removed ESB databases, ESB folder from Program files(x86), forcefully removed ESB assemblies same as above.
And added following DLLs to GAC and in the project references.
- Microsoft.Practices.EnterpriseLibrary.Common.dll (Version - 5.0.414.0, Public key - 88c53284f174dd3d)
- Microsoft.Practices.EnterpriseLibrary.Data.dll (Version - 5.0.414.0, Public key - 88c53284f174dd3d)
Still the error persists.
Please help me on this.