I have a Visual Studio 2008 .NET 3.5 Web forms project that constantly shows warnings for my class tags in the html. I have the CSS file included in the master page with the following link:
<link href="/Css/Site.css" rel="stylesheet" type="text/css" />
The warnings I get are:
The class or CssClass value is not defined.
At run time all is good and everything works as expected but these warnings in VS are getting very annoying. Is there some other way to have this linked in? I don't get any VS intellisense on the html class attributes and when I click the warning and then hover over the class="something"
attribute on the html the warnings all disappear. Next time I build all the warnings come back.
Any ideas?
EDIT: The file is in include in the project. I have also tried changing the link to:
<link href="Css/Site.css" rel="stylesheet" type="text/css" />
This gives me intellisense it seems but I still have the warnings...
I have also tried:
<link href="~/Css/Site.css" rel="stylesheet" type="text/css" />
This is seeming to work...
Why would they all work at runtime but each one cause different behavior in VS?
EDIT: So closed and re-open VS, the ~ is still being used but warnings are all back and not going away. So is there anything else I can try? The master page is in the app root, the content pages are in sub directories.