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.
1) Use the Tools->Options menu command, select the Text Editor->C# settings, and then check the two circled check boxes above (Auto-list members and Parameter information). IntelliSense will then be turned on and work fine.
It's actually easy for most languages: Select Tools/Options on the menu. On the Options dialog box, select Text Editor, then select the language you use, then select "General". Uncheck "Auto list members" and "Parameter completion".
To access this options page, choose Tools > Options, and then choose Text Editor > C# > IntelliSense.
If IntelliSense is not working as it should on your Windows 11/10 PC, you can try restarting VS Code and this should solve the issue. Restarting the program can be really effective and time saving in some cases. If the issue persists, you can try restarting your computer altogether.
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.
The link in the blog should point at http://www.dotlesscss.org/
Check out the t4css*.zip files at https://github.com/dotless/dotless/downloads which contain the .tt file (T4 template)
If you're wondering what a T4 template is, have a look at this.
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