Interestingly, the first couple projects I created had
This time around, however, I was refactoring out some models and interfaces for my web application and I ran in an interesting error...
The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
So, I'm thinking it must be some other error in the project, surely IEnumerable is in there somewhere, right? WRONG!
Googling around found minimal information that was complete so I figured I'd put together the pieces. This post got me in the right direction.
Before:
"frameworks": {
"net451": {
"dependencies": {
"System.ComponentModel.Annotations": "4.0.0"
}
},
"dotnet5.4": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.ComponentModel.Annotations": "4.0.11-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Runtime": "4.0.21-beta-23516",
"System.Threading": "4.0.11-beta-23516"
}
}
}
After:
"frameworks": {
"net451": {
"dependencies": {
"System.ComponentModel.Annotations": "4.0.0"
},
"frameworkAssemblies": {
"System.Runtime": "4.0.10.0"
}
},
"dotnet5.4": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.ComponentModel.Annotations": "4.0.11-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Runtime": "4.0.21-beta-23516",
"System.Threading": "4.0.11-beta-23516"
}
}
}