GoDogGo
GoDogGo

Reputation: 85

Visual Studio 2012 Error List is wrong

So I have a solution that compiles and runs fine.

But the Error List window is always maxed out (Last line in window: "Maximum number of errors has been exceeded.")

And they're totally crazy error messages like:

When I double click any of the errors, it just takes me to the first line of my class file.

I might not be the best developer in the world, but I'm not making mistakes like the Error List window says I am!

Upvotes: 3

Views: 2224

Answers (2)

Daz
Daz

Reputation: 2873

This started happening to me after reinstalling my system.

I think GoDogGo's solution of changing the file encoding is probably valid (I found I had a mixture of different encodings at work). Intellisense was showing errors that didn't match up to the right character positions in my source files.

I also had issues with types not being recognised, such as 'Data.DataTable'. I found I had included an un-encoded ampersand in the value of a web.config appSetting entry (it was part of a folder path). I think the compiler probably knew about it but didn't include it in the visible list of errors in the IDE's error list.

Once I had corrected the ampersand encoding and rebuilt, all the other errors disappeared.

Upvotes: 0

GoDogGo
GoDogGo

Reputation: 85

I copy/pasted the entire class file to notepad, save the text file, closed the text file, opened the text file and copy/pasted back into the class file...no more crazy Error List.

After I went through this process, I found out that you can choose "Save As" from VS, and there is a little arrow next to the Save button that lets you set the encoding.

So I'm guessing it was an encoding thing...the original class file has been in the project since Visual Studio 2003...no issues until VS2012...go figure!

Thanks everyone!

Upvotes: 1

Related Questions