Hello,
I’ve been using Unity 5 for a year and everything worked fine until last week when we had the idea to update our IDE to 5.3.1 version.
Now the compiler shows two errors:
The name `Dictionary' does not exist in the current context.
The name `Items' does not exist in the current context.
both localized in a simple KeyedCollection
public class CommandProcessQueueCollection : KeyedCollection<int, CommandProcessQueue>
{
public bool TryGetQueue(int id, out CommandProcessQueue queue)
{
if (Dictionary != null)
{
return Dictionary.TryGetValue(id, out queue);
}
foreach (var i in Items)
{
var k = GetKeyForItem(i);
if (Comparer.Equals(id, k))
{
queue = i;
return true;
}
}
queue = default(CommandProcessQueue);
return false;
}
}
Do you have any idea about this odd issue?
Thank you very much for your support.
G
Update:
Things are becoming even more tricky as the exact same code has been compiled in 5 different machines with 5.3.1 installed.
Well, 2 out of 5 proved to compile without any error.
Furthermore, msbuild seems to compile the code without any error as well.
Probably, there are differences, among the machines, in the .NetFramework used by Mono for compilations.