So I keep getting TypeLoadExceptions any time I use IEnumerable objects. When trying to use 'yield return instruction' in a Harmony transpiler, of even just using a regular old enumerable like so:
IEnumerable<Pawn> pawns = pawn.Map.mapPawns.SpawnedPawnsInFaction(pawn.Faction).Where(x => x != pawn);
Once this code is executed, the below exception occurs. Best I can tell is that it is a dependency or reference error.
Using
Harmony 1.2.0.1
HugsLib 6.1.3
.net 4.7.2
I've seen examples where other mods are doing the exact same thing (especially transpilers) code-wise, so I doubt that that's an issue. Any ideas what I've screwed up?
IEnumerable<Pawn> pawns = pawn.Map.mapPawns.SpawnedPawnsInFaction(pawn.Faction).Where(x => x != pawn);
Once this code is executed, the below exception occurs. Best I can tell is that it is a dependency or reference error.
Code Select
System.TypeLoadException: Could not load type 'System.Func`2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Using
Harmony 1.2.0.1
HugsLib 6.1.3
.net 4.7.2
I've seen examples where other mods are doing the exact same thing (especially transpilers) code-wise, so I doubt that that's an issue. Any ideas what I've screwed up?