I'm developing in Visual Studio 2013 Premium along with Web Essentials 2013 (update 4) an MVC 5 application with LESS for my CSS preprocessor. Web Essentials automatically compiles the files upon saving of the .less
file.
The issue I am having is when I create a new HTML element with a class (or id) and then add that class to my .less
file with some styles in it, Intellisense does not pick up the change & that the CSS class in the HTML has a corresponding CSS class in my .less
stylesheet, therefore it says Unknown CSS class 'name-of-the-class'. So for example:
My HTML in my view
<div class="name-of-class"></div>
CSS in my .less
file
.name-of-class {
color: #000;
}
It doesn't seem to recognize that I added the class in either place, likely because LESS compiles on save and Intellisense doesn't pick up the change.
I have tried:
- Closing the files and reopening them after I add the HTML and CSS
- Rebuilding and re-running the solution
- Currently I'm using bundles for attaching my CSS to the page, but instead of bundling the compiled LESS I used a
<link href="app.css"/>
element directly in the<head>
of my HTML file pointing to the compiled LESS file.
An image of the issue I see is below: