Does Resharper tell me a css class is unknown because it's on a CDN?

B. Clay Shannon picture B. Clay Shannon · Jun 12, 2013 · Viewed 7.6k times · Source

Resharper tells me, "Unknown css class 'container-fluid" for this line in my site's _SiteLayout.cshtml file:

<header class="container-fluid">"

I do have this in my <head> section:

<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">

...and I believe "container-fluid' is there. Is this simply a matter of Resharper not being able to find the class because it's remote?

Answer

IfElseTryCatch picture IfElseTryCatch · Jul 7, 2014

I was also having this issue using Resharper 8.2, tried Fizzix solution but I already had those options selected and it didn't seem to fix it :(

What did work, however, was a simple fix;

  • I right-clicked on the css file that contained the class it was telling me was unknown in my SOlution Explorer.
  • Selected 'Exclude from Project'
  • Right-clicked on file again and 'Include in Project'

Error went away instantly and page now renders with the css class correctly! Weird!