Sunday, May 22, 2016

Attempt Compiling LESS into CSS with Visual Studio 2015 via Web Compiler.

So far, I only write CSS for my website presentation. But I heard that VS2015 can compile LESS to CSS and minify it. But I heard wrong. The feature is never in VS2015 but in the previous version that is in the VS2013. That is disappointing.

So I try searching for any extension on the net. Bumped to this in the VisualStudioGallery called Web Compiler. I decided to download and install it.

Then I just have to right-click on the LESS file (in Solution Explorer) and choose compile (right?).





This is my Solution Explorer and below is my Context Menu for Web Compiler after I right clicked on the LESS file.



Selected on Compile. After that I notice some new files appear in my Solution Explorer.

  1. compilerconfig.json
  2. compilerconfig.json.defaults



I thought it should compile into a CSS file.. But noting of that sort happened. Do I miss any step?. Below is what my Solution Explorer looks like after compiled.



The only difference is that additional 2 JSON files. No CSS produced.

After that I spent several hours googling about this. what I've found was just about how to do compilation on build and about the Task Runner. Try to configure to build on Post Build event. But still no luck about generating the CSS file.

Arrgh, wasted several hours for this. Did I miss something? Should I give up? Or Did I misunderstood about the word "compile" that it should produce a CSS file for me?


...



UPDATED:
Finally I manage to solve this problem here:
Success: Compiling LESS into CSS with Visual Studio 2015 via Web Compiler.



No comments:

Post a Comment