Reputation: 135
I have installed Visual Studio 2015 and, since Web Essentials won't compile .less
files anymore, I installed the Web Compiler add-on for compiling .less
files.
The issue is that I can't seem to set it up to auto-compile the .less
file into .css
on save. What can be done for compiling the .less
files on save?
Upvotes: 8
Views: 6118
Reputation: 1871
I use Web Essentials with Visual Studio 2015 when using Less. Web Essentials for Visual Studio 2013 has the built-in feature that compiled your .less file into a .css and .min.css file, and it also had the feature to update the .css and .min.css files when you save your .less file.
Now with VS 2015, I had to download two seperate add-ons to get this feature back: Web Compiler and Bundler & Minifier
I thought my Visual Studio/Web Essentials add-on was broken... Bundler & Minifier should fixed the auto-save issue for you, it did for me :)
Upvotes: 9
Reputation: 524
now with VisualStudio 2015 you have to use a task manager like Gulp or Grunt. These tools are NPM packages which can be executed in visual studio with the "task runner explorer"
By example, try to implement (with the complete tutorials on my links) Gulp with the "gulp-less" module to compile your less files, then you can attach your gulp execution with some events of Visual Studio ( like pre-build, post-build .. etc ) or you can use "gulp-watch" to check when you save a less file and automatically compile them.
Upvotes: 0