2011-10-03 69 views
1

您好我有3行代碼在我的web.config(.NET 4.0)項目產生如下ASP.NET Web.config中引用的程序集

<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) 

但是我引用該裝配Microsoft.Practices。 EnterpriseLibrary.Data從項目中可能沒有強名稱的私有文件夾(我添加引用,瀏覽到私有文件夾並添加Microsoft.Practices.EnterpriseLibrary.Data庫)。

我希望我可以在項目配置的某個位置找到添加的庫(不知道在哪裏 - 我搜索了屬性等等,所以我可以在Web.config中替換那個沒有強名稱的值並開始行動,有人可以舉手嗎?

感謝

回答

1

打開一個新的項目,然後嘗試在通過的NuGet引用和比較你的配置項。

你只需要引用的程序集的版本錯誤。

+0

在一個Web項目中,如何找到引用的文件版本 - web.config中沒有任何內容,項目屬性中沒有任何內容,我無法使用ildasm – josephj1989

0

我發現療法e是我的連接字符串中的一個問題。我有一個SQL Server Compact的連接,我沒有提供名稱。這導致了問題。

相關問題