【发布时间】:2013-04-19 00:42:10
【问题描述】:
我有一个在 IIS7 上运行的 ASP.NET 项目。我只是添加了 Microsoft.Practices.EnterpriseLibrary.Common.dll、Microsoft.Practices.EnterpriseLibrary.Data.dll 和 Microsoft.Practices.EnterpriseLibrary.ObjectBuilder2.dll。
我收到此错误:
Error 2 Could not load file or assembly 'Microsoft_Practices_EnterpriseLibrary_Common' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
我研究了这个问题,发现这意味着 dll 不在正确的位置,但它在我的 projectdirectory/bin 文件夹中。所以我不明白应该在哪里引用它。我的 Web.config 中没有引用它,但项目模板中没有生成程序集标记。
我需要引用这些程序集吗?如果是这样,我在哪里可以找到必要的属性,即 PublicToken 等?
【问题讨论】:
-
如果您尝试将dll添加到项目中,请右键单击解决方案->添加引用。如果您正在部署您的网站,请将 dll 复制到 ./bin 文件夹。
标签: c# asp.net assemblies