The code highlighter shows an error on the class definition if the same class exists(copy-paste class file) in another file and that file has 'Build Action' set to 'None' .
Please find attached a VS2005 project.
Steps to reproduce 2 bugs:
- When you open this solution, the 'Class1' in 'Class1.cs' should be highligted in red ("Dupplicate definition ....").
- Then set the 'BuildAction' of 'Copy of Class1.cs' to 'None' and compile <- at this stage Class1 is still highligted in red!
- Then save all files and close VS
- Open the solution again
- The 'Class1' in 'Class1.cs' should not be highligted
- Set the 'BuildAction' of 'Copy of Class1.cs' to 'Compile' and compile solution <- at this stage Class1 is not highligted in red!