I have the nuget package installed.
The bin folder does not show a 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. The system cannot find the file specified.
No matter what i do, i cannot resolve it! Why on earth is the dll missing.
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
- I have tried cleaning and rebuilding
If i remove the references from my 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
- The issue arose when i updated umbraco, if that helps at all. 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."
Edit 2:
- After i removed system.collections nuget package, the detailed output log stated:
"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"."
using section in the .cs file hearder
as well as manually adding the reference to the references in at the project level. also you need to check the packages file from nuget.. you can edit that as well and remove references that are not needed.. nuget , can be tricky if you are not familiar with it – MethodMansystem.collection
is already there most of the time. You only have to import namespaceusing System.Collections
– T.S.