Search code examples
c#asp.netvisual-studio-2013enterprise-library

databasefactory.cs not found error


I am using Microsoft.Practices.EnterpriseLibrary in my application. I have added Microsoft.Practices.EnterpriseLibrary.Data.dll as reference and I can see DatabaseFactory if I object browse Microsoft.Practices.EnterpriseLibrary.Data.dll. But still I am getting databasefactory.cs not found error. Can anyone please help.

Web.config code:

<add name="ExternalFile" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" filePath="dataConfiguration.config" >

Solution

  • Error is solved... I was importing dlls from C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin folder but I also had same dlls in bin folder pf application, both of different versions. I deleted the dlls from application bin folder and copied dlls from "C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin" to application bin. This solved error. Thanks for help........