无法加载文件或程序集'System.Data.Linq,版本= 4.0.0.0 [英] Could not load file or assembly 'System.Data.Linq, Version=4.0.0.0
问题描述
错误是:
无法加载文件或程序集'System.Data.Linq,Version = 4.0.0.0, 文化=中性,PublicKeyToken = b77a5c561934e089'或其中之一 依赖关系.系统找不到指定的文件.
Could not load file or assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
我尝试了很多在Google搜索上找到的解决方案,即使在这里也没有成功.
I have tried many solutions find on Google search and even here but without success.
我尝试过:
<add assembly="System.Data.Linq, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
但是在页面上,由于Linq无法正常工作,我在此行出现了错误:
But on the page I have error on this line because Linq not working :
string ns = string.Join(",", (from co in colorList select "?").ToList());
.dll
在服务器上存在:
我的web.config文件
My web.config file
<?xml version="1.0"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<compilation>
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</assemblies>
</compilation>
</system.web>
</configuration>
#Edit 01
#Edit 02
推荐答案
此错误可能是由于DLL版本不匹配所致.尝试删除bin文件夹并重建应用程序.
This error may be due to DLL version mismatch. Try to delete bin folder and rebuild the application.
这篇关于无法加载文件或程序集'System.Data.Linq,版本= 4.0.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!