Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 690
Maverick Avatar asked Jan 02 '15 00:01

Maverick


People also ask

How to use LESS in Visual Studio 2019?

By default, compilation is off and that's indicated by a watermark at the bottom right corner of any LESS file. To enable LESS compilation, simply click the watermark and it changes to indicate LESS compilation is "on". All .


1 Answers

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.

like image 133
ndd Avatar answered Sep 22 '22 07:09

ndd