views:

606

answers:

1

I have a VisualStudio solution created in Vs2005 which is making use of Microsoft Enterprise Data Library.Now I converted this to Visual studio 2008 .Now when i buid the project ,i am getting an error like the below An error occurred creating the configuration section handler for dataConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (D:\dotnet\Test\Test.UI\web.config line 4)

My Web.Config 4 th line is as follows

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.5.0.0, Culture=neutral, PublicKeyToken=null"/>

I chanegd the version from 2.0.0.0 to 3.5.0.0 .But no result.Same error i am getting. Can anyone help me to solve this ? Thanks in advance

A: 

Hi Shyju,

Have you checked if the public key token is in fact null? You can do this with sn –T Microsoft.Practices.EnterpriseLibrary.Data.dll

RichardOD
Yes Public key tocken is null
Shyju
OK- if you referencing the DLL privately as opposed to in the GAC, try this:<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"/>;If that works then you have the wrong version. Failing that try fuslogvw.
RichardOD
Thanks Richard .That worked. But I am wondering how can correct my old line with the correct version
Shyju
Locate the DLL in explorer, choose properties from the context menu and check that the Assembly Version (on the Version tab) is in fact what you think it is. Failing that try this: http://msdn.microsoft.com/en-us/library/e74a18c4.aspx
RichardOD