Compiling LESS

Jul 17, 2013 at 9:33 PM
Can you describe what needs to be done to get the module to compile LESS files. I enabled the module and the LESS Processor. I have a Style.Include in my Document.cshtml file pointing to the main LESS file, but it's not compiling the file and including the other resources. I basically get a resource that contains all the @import statements instead of actually importing them.

Thank so much!

Could never get the DotLESS module to work properly, so I'm trying Combinator.
Jul 17, 2013 at 11:03 PM
Edited Jul 17, 2013 at 11:04 PM
If your file has the .less extension it should run through the preprocessor and then through DotLESS so this should give you back the compiled css file. However I think I've never tried this out with imports, it could be well something broken with those (I actually prefer to compile LESS on save and build). Are other LESS expressions evaluated correctly? Could you break into LessPreprocessor ln 15 and check if it is hit?
Nov 12, 2013 at 9:55 AM
LESS files don't get compiled for me either.

I've tried debugging the LessPreprocessor but without success.
Nov 12, 2013 at 10:35 AM
And you have the Combinator LESS processor feature enabled? BTW unfortunately the DotLESS library is outdated with not supporting LESS > 1.3 (the released version).
Nov 12, 2013 at 10:57 AM
yes I have the Combinator LESS processor feature enabled.

I've been using the DotLESS library to compile my LESS files (Bootstrap 2.3.2).

My current solution using combinator is to just exclude the .less file extension from combination, so i'm really just using it for javascript now :-(
Nov 12, 2013 at 11:17 AM
This is strange, because it should work then.

You can also compile LESS files when building the project or when saving them with the WebEssentials VS plugin, then just include the resulting CSS files in your views.