简体   繁体   中英

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.

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

PS: 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 .

我使用http://www.mindscapehq.com/products/web-workbench在visual studio中获得“较少”的智能感知。

http://maghansson.blogspot.com/2011/12/aspless-and-sharepoint-2010.html

Here's instructions how to download the package for dotless and get all the benefits of intellisense and other functions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM