开发者

ASP.NET WEb.config Referencing an assembly

开发者 https://www.devze.com 2023-04-10 03:27 出处:网络
Hi I have 3 lines of code generated in my Web.config (.net 4.0) project as below <configSections>

Hi I have 3 lines of code generated in my Web.config (.net 4.0) project as below

<configSections>
      <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
</configSections>

When I run the project I get the error
: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

However I am referencing that assembly Microsoft.Practices.EnterpriseLibrary.Data from a private folder where it may not have a strong name etc in the project(I do Add references,Browse to private folder and add the Microsoft.Pr开发者_C百科actices.EnterpriseLibrary.Data library).

I hope I can find the added library somewhere in project configuration(No idea where - I searched properties etc. So I can substitute that value without strong name etc in Web.config and get going. Can somebody give a hand ?

thanks


Open a new project and try adding the references via NuGet and compare your config entries.

You just have the wrong version of the assembly referenced.


I found there was a problem in my connect string . I was having a connection for SQL Server Compact and I did not have the providename. This was leading to problems.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号