How to compile .less files on save in Visual Studio 2015 (preview)

Maverick picture Maverick · Jan 2, 2015 · Viewed 29.6k times · Source

Ok, so I've created a new ASP.Net 5/MVC 6 project in Visual Studio 2015 Preview. In keeping with our current method of doing things, for styling I want to use .less files. Creating the files is straightforward, but Web Essentials no longer compiles them.

So my question is this: what precisely do I need to do to get my .css files generated when I save the .less files?

Based on my adventures getting Typescript to work nicely, I will have to use Grunt to accomplish this task, but I am brand-new to Grunt and so I'm not sure how one would do it?

Please help!

Answer

ndd picture ndd · Jul 22, 2015

With VS 2015 Web Essential is split into multiple extensions you can download the Web Compiler extension from here and it also has details on how to use it.

It is certainly not elegant as it used to be, but if you are using existing project and want to use a compiler for LESS then this may do the basic job.