views:

857

answers:

3

Over the last couple of days I started getting the following validation warning (green squiggly line at design time) in a Visual Studio 2008 ASP.NET WebForms project:

Validation (): Element ‘xxxx’ is not supported.

Where 'xxxx' was a standard ASP.NET server controls (asp:panel, asp:container, asp:textbox)

The application would still compile and run but the warnings were an annoyance.

See my answer for the resolution I found.

+4  A: 

A quick Google search soon found the solution: Delete the files from “C:\Documents and Settings[Username]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas” folder (or “…\VisualStudio\8.0\…” if running Visual Studio 2005) in Windows XP. In Windows 7 it is under "C:\Users{User Profile}\AppData\Roaming\Microsoft...etc". Remember also the "VisualStudio" part of the path will be different depending on the version installed.

I closed Visual Studio (always a good ideas for changes that will affect the IDE), deleted the files then re-opened the project. The warnings were gone.

I found references to this solution at: http://forums.asp.net/t/1205528.aspx http://blogs.msdn.com/mikhailarkhipov/archive/2005/04/21/410557.aspx

FYI, the search term I used in Google was “element is not supported”.

I don't know why this happens but I do know there are some flakey domain profile things happening in the network environmnet.

Jason Snelders
Thanks a lot for this tip. I could not think of anything but reinstallation of Visual studio after seeing this issue.
RKP
A: 

Or if you are running Windows 7, the following path is the W7 equivalent:

C:\Users\Classic .NET AppPool\AppData\Local\Microsoft\VisualStudio\9.0

Richard Shaw
In Vista it's "C:\Users\{USER}\AppData\Roaming\Microsoft\VisualStudio\9.0\".
Protector one
A: 

Another possible solution. When using Master pages, this warning may occur when using ContentPlaceHolders to put elements in document sections where they are not allowed, according to your doctype. E.g., putting a div in the head, under xhtml 1.0 Transitional. Removing the offensive elements (i.e., making your page validate), will make the warning disappear.

Protector one