XN16
XN16

Reputation: 5879

How to resolve “Validation (): Element ‘x’ is not supported” warning in Visual Studio 2010

I have been getting all of these "Validation (): Element 'x' is not supported" warnings and I can't seem to find a way to get rid of them. Here are two examples:

I have searched on the web and all solutions point to removing the following folder:

C:\Users\{username}\AppData\Roaming \Microsoft\VisualStudio\10.0\ReflectedSchemas

Which seems to fix 90% of people's issues, however I don't have that folder anywhere on my computer!

I am using Visual Studio 10 SP1 and this project is an MVC 3 project using Razor and HTML5.

So can anyone else suggest what else might be causing the issue?

Thanks very much.

Upvotes: 4

Views: 24220

Answers (4)

Abdul Razique
Abdul Razique

Reputation: 39

First of all you need to know it's not an error!

Steps to resolve the warning message for an element.

  1. Right click the warning area, you will see a context menu.
  2. Click "Formatting and Validation..." basically it's at the bottom of the menu.
  3. Go to "Validation" in "HTML or HTML (Web Forms)" section. You'll see a checkbox with "Show errors" is checked to true with header "Options". Just unchecke it.

enter image description here

enter image description here

That's it, you are done...

Upvotes: 0

Device Gich
Device Gich

Reputation: 11

You have to remove

xmlns="https://www.w3.org/1999/xhtml"

let it remain

<!DocType Html>

only above

Upvotes: -1

Nurp
Nurp

Reputation: 1489

I was encountering the same problem and ALL classic html elements (div, a, p, table..) in every page had green underlines. Intellisense did not give any help with these elements, as if they didn't exist. But all asp controls were fine and valid.

Green underlines

The error was the xmlns="https://www.w3.org/1999/xhtml" in the html tag in my master page. Html 5 does not seem to work well together with the xmlns declaration so I removed it, and voila - everything magically works again!

Upvotes: 9

KRyan
KRyan

Reputation: 7608

Those are valid warnings, not a bug or other sort of "issue." The list of valid attributes for <ul> is given in the W3C standards, and it doesn't include name. Meanwhile, border-radius was introduced in CSS 3, which means if you validate against CSS 2.1 it's not going to work.

You can either ignore them or figure out how to suppress those particular warnings in VS2010 (I know how to do that for VC++, but I haven't used VS for HTML before; there should be some section in the Properties window for it).

Upvotes: 1

Related Questions