Resolving “Validation (): Element ‘xxxx’ is not supported” warning in Visual Studio 2005/2008

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 control (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.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Delete the files from “C:Documents and Settings[Username]Application DataMicrosoftVisualStudio9.0ReflectedSchemas” folder (or “…VisualStudio8.0…” if running Visual Studio 2005) in Windows XP. In Windows 7 it is under “C:Users{User Profile}AppDataRoamingMicrosoft…etc”. Remember also the “VisualStudio” part of the path will be different depending on the version installed.

I closed Visual Studio (always a good idea 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

A quick Google search found the solution.
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 flaky domain profile things happening in the network environment.

Method 2

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.

Method 3

I had the doctype and html tags wrong. This did work:

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

Method 4

Run VS (2022) under Administrator rights resolved this problem in my opinion.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x