Search code examples
.netvisual-studio-2010t4dotless

DotLess IntelliSense In Visual Studio 2010


I've recently found out about the DotLess library and I was so excited about it because CSS has been always annoying for me. I thought this library would be very convenient to use. Unfortunately, once I tried it out, I found out that VS 2010 does not provide IntelliSense for files with the .less extension. That actually got me frustrated and I decided not to use DotLess until VS 2010 provides IntelliSense someday.

Jon Galloway's video What MVC Developers Should Know About HTML and CSS talks about HTML/CSS and some handy tips including DotLess, and he mentioned something about a T4 template by Phil Haack that would allow me to use .less.css extension and then it does something to generate the proper CSS file.

I went to Phil's blog and located the post in which he talks about that T4 template. There are no direct links to the T4 template and the links are dead in his blog post which is relatively outdated (2009).

Does anyone have ANY solution to this issue? I really want to use the DotLess library, but I do not want to lose the IntelliSense.


Solution

  • For some reason, I found out the solution right after I posted this question. Here are two threads from StackOverflow that talk about this issue and provide solutions that actually work:

    Open a file in Visual Studio's CSS Source Editor

    How to turn on Visual Studio 2010 .css Intellisense on .less file

    P.S: I used the solution proposed by Noah Richards and it works perfectly.

    Well, I'm sorry about that, the lesson I learned from this thread is to look much better for answers before posting next time.