简体   繁体   English

无法加载文件或程序集'System.Collections,版本= 4.0.0.0

[英]Could not load file or assembly 'System.Collections, Version=4.0.0.0

I have the nuget package installed. 我已经安装了nuget软件包。

The bin folder does not show a system.collections.dll. bin文件夹不显示system.collections.dll。

When i run the application, i get this error: 当我运行应用程序时,出现此错误:

Could not load file or assembly 'System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. 无法加载文件或程序集“ System.Collections,版本= 4.0.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a”或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。

No matter what i do, i cannot resolve it! 无论我做什么,我都无法解决! Why on earth is the dll missing. 为什么地球上缺少dll。

I have tried: 我努力了:

  • installing latest version, 安装最新版本,
  • I have made sure there are no conflicting versions, 我确保没有冲突的版本,
  • I have tried putting build in verbose mode but the information is not particularly helping me. 我曾尝试将构建置于详细模式,但该信息对我没有特别帮助。
  • I have tried deleting bin and obj folders 我尝试删除bin和obj文件夹
  • I have tried cleaning and rebuilding 我曾尝试清洁和重建

If i remove the references from my web.config 如果我从web.config中删除引用

It throws up further errors on the following and if i keep removing them, more and more problems come up: 它在以下方面引发了更多错误,如果我继续删除它们,将会出现越来越多的问题:

<add assembly="System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
<add assembly="System.Collections.Concurrent, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
<add assembly="System.Diagnostics.Debug, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
<add assembly="System.Globalization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
<add assembly="System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

Any ideas? 有任何想法吗?

Further notes: 进一步说明:

  • All projects reference .net framework 4.5.2 所有项目均参考.net Framework 4.5.2
  • The issue arose when i updated umbraco, if that helps at all. 当我更新umbraco时,如果有帮助的话,就会出现这个问题。 7.3.4 - 7.7.6 7.3.4-7.7.6

Edit: 编辑:

  • I closed Visual studio and am now getting a new warning come up "Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed." 我关闭了Visual Studio,现在收到新的警告:“找到了无法解决的相同从属程序集的不同版本之间的冲突。将日志详细程度设置为详细时,这些引用冲突会在生成日志中列出。”

Edit 2: 编辑2:

  • After i removed system.collections nuget package, the detailed output log stated: 我删除了system.collections nuget软件包后,详细的输出日志显示:

"Line 2235: 1> There was a conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes"." “ 2235行:1>“ mscorlib,版本= 4.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089”和“ mscorlib,版本= 2.0.5.0,文化=中性,PublicKeyToken = 7cec85d7bea7798e,Retargetable =是之间存在冲突” ”。

There's no System.Collections assembly. 没有System.Collections程序集。 They are all in mscorlib.dll. 它们都在mscorlib.dll中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法加载程序集System.Collections.Concurrent版本4.0.0.0 - could not load assembly System.Collections.Concurrent version 4.0.0.0 无法加载文件或程序集&#39;System.Data.SqlServerCe,Version = 4.0.0.0 - Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0 无法加载文件或程序集 'System.Web.Services,版本 = 4.0.0.0 - Could not load file or assembly 'System.Web.Services, Version=4.0.0.0 无法加载文件或程序集&#39;System.ServiceModel.Web,版本= 4.0.0.0&#39; - Could not load file or assembly 'System.ServiceModel.Web, Version=4.0.0.0' 无法加载文件或程序集“ System.Web.MVC,版本4.0.0.0” - could not load file or assembly 'System.Web.MVC, version 4.0.0.0,' 无法加载文件或程序集'System.Drawing,Version = 4.0.0.0 - Could not load file or assembly 'System.Drawing, Version=4.0.0.0 无法加载文件或程序集 &#39;Ninject 版本 4.0.0.0 - Could not load file or assembly 'Ninject version 4.0.0.0 无法加载文件或程序集 'MSHTML,版本 = 4.0.0.0, - Could not load file or assembly 'MSHTML, Version=4.0.0.0, System.IO.FileNotFoundException:无法加载文件或程序集&#39;System.Net.Security,Version = 4.0.0.0 - System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Security, Version=4.0.0.0 点网核心和Azure存储:无法加载文件或程序集系统,版本= 4.0.0.0 - Dot Net Core and Azure Storage: Could not load file or assembly System, Version=4.0.0.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM