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?
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;
Error went away instantly and page now renders with the css class correctly! Weird!
ReSharper cannot access this file since it is not yet rendered into the project.
For example, when you have a CSS file within your project, ReSharper can simply search through it looking for class names. Although, when a CSS file is outside of your project (remote, or in a CDN), it does not have the capabilities to access it since it is not included yet.
Once your project is running within a browser and the file from the CDN is called, that is when it is included within your project.
Therefore, if you would like to know which class names exist or not when working with ReSharper, it is usually best to download them and include them within your project :)
EDIT:
After researching into this, I think I have found a way to allow ReSharper to search within external sources and uncompiled code.
Go to: ReSharper -> Options -> Tools -> External Sources
More information in the official documentation for ReSharper | Options | Tools | External Sources.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With