Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Visual Studio 2013 generate CSS files from .less files?

Visual Studio 2013 is awesome, now with syntax highlight and autocomplete for .less files. But does it also generate the respective CSS files? Do I need to install other extensions for that?

like image 740
Lucian Avatar asked Nov 08 '13 09:11

Lucian


3 Answers

Yes. While Visual Studio 2013 doesn't come with a LESS compiler built-in (so you'll need to bring your own), you can either use an external compiler, or install an extension so you can compile your LESS files from within the IDE.

like image 103
BoltClock Avatar answered Nov 13 '22 11:11

BoltClock


I had trouble compiling Bootstrap LESS (after installing the Twitter.Bootstrap.Less NuGet).

The trick with WebEssentials is to cause the bootstrap.less file to need saving (typing a space, then pressing delete is sufficient), then saving it. The corresponding .css, .min.css and css.map files are automatically generated and appear nested under the .less file in Solution Explorer.

like image 25
NickBeaugié Avatar answered Nov 13 '22 11:11

NickBeaugié


If you don't want to install plugins in your Visual Studio, you can use an external compiler.

Currently I'm using Koala, every time you save your LESS file he will compile it automatically in your output folder.

Take a look at the official LESS page about GUI Compilers.

like image 45
Wellington Zanelli Avatar answered Nov 13 '22 11:11

Wellington Zanelli