For months now I have stumbled across a weird problem where I get unpredictable compile errors on different machines saying:
'MyDataTable' does not contain a definition for 'AsEnumerable' The compile error always occurs on an XSD generated strongly typed DataTable classes. I'm using the same source, OS, VS2010 and tool versions, but I get the error unpredictably. I just found I could compile errors by adding a reference to System.Data.Entity to the project containing the XSD files, forcing a 'Run Custom Tool' on the XSD files and rebuilding. This doesn't explain why it compiles on some machines and not others. Even worse, to prove to myself it was the solution, I removed the Entity references and ran all the steps again and the error did continues to compile okay. Who knows the old parable of the TV repair man? He comes around and looks in the back of the TV and says "Ah, this valve looks faulty". He replaces the valve and the TV works. Just to be sure he puts the old valve back in, and the TV works. I find that happens a lot in software these days. Greg
