|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Possible VS2003 c# compiler bug: error CS0584: Internal Compiler Error: stage 'COMPILE' symbol ''It's the second time it happens to me... Working with typed DataSets and doing copy & paste, I compile and get weirds messages like these: An internal error has occurred in the compiler. To work around this problem, try simplifying or changing the program near the locations listed below. Locations at the top of the list are closer to the point at which the internal error occurred. error CS0584: Internal Compiler Error: stage 'BIND' symbol 'WindowsApplication1.Form1.Form1_Load(object, System.EventArgs)' error CS0584: Internal Compiler Error: stage 'COMPILE' symbol 'WindowsApplication1.Form1' error CS0584: Internal Compiler Error: stage 'COMPILE' symbol 'WindowsApplication1' error CS0584: Internal Compiler Error: stage 'COMPILE' symbol '' error CS0586: Internal Compiler Error: stage 'COMPILE' Once you get one of these you must exit VS2003, because the compiler does not work anymore... Here is how to reproduce it: Create a Solution, with 2 projects, one client app and one class library. In the class library proyect add a typed Dataset, and a class with a method like this: public MyDataset FakeFunction (MyDataset.ClassificationDataTable table) { return new MyDataset(); } In the client app, call the method in this way (here's where the error is): MyDataset ds2 = MyClass.FakeFunction(ds.ClassificationDataTable); That is you miss it doing copy-paste, you should have written: MyDataset ds2 = MyClass.FakeFunction(ds.Classification); And you got the evil messages, very descriptive, aren't they? The curious thing about it is that if you place the class with the method and the Dataset in the client app proyect, the error message is accourate, so the error only happens when referencing another project: error CS0572: 'ClassificationDataTable': cannot reference a type through an expression; try 'ClassLibrary1.MyDataset.ClassificationDataTable' instead |
|||||||||||||||||||||||