Nothing annoys me more on a Friday afternoon than the Visual Studio Error List raising its ugly head and popping up with (often irrelevant ones) about the CSS and HTML markup.
So after playing about with settings and looking around the internet, I found you can either just close all the CSS & HTML (or aspx) files you are working on (as it only checks open document's markup) or you can tell Visual Studio to ignore the errors by un-checking:
CSS:
Tools > Options > Text Editor > CSS > Miscellaneous > Errors
HTML:
Tools > Options > Text Editor > HTML > Validation > Show errors
Please, no comments about using the correct validation target, actually fixing the errors or conforming to how Visual Studio wants me to do everything – I checked the “as warnings” box and will revisit them later. You can choose to not detect the Errors or mark them as Warnings…
Or compile with the CSS files closed. Closing the CSS file in VS and the errors don’t display is bizarre. One would think if a file in VS has an error – why would it matter if the window was open???