Steve
Steve

Reputation: 14922

How to set directory where Visual Studio compiles LESS files?

I am using VS 2012 on Win 7. Currently (by default, I assume) it compiles LESS files to CSS on save to the same directory as the LESS file.

I would rather save all my CSS files to a "css" directory next to the "less" directory. I'm coming from the Mac using CodeKit to compile, and here you can choose an output path. I can't figure out how to set the output path in VS.

What I am looking for is:

-Projectroot
----less
----css
----js
etc.

Where my LESS files are all in "/less" and the compiled css goes to "/css"

Upvotes: 1

Views: 2076

Answers (2)

Ofir
Ofir

Reputation: 334

If you're working in a team you'll probably want them to have the same CSS output folder as yours (and not telling each one of them to change their default Web Essentials settings) so the best way is to output your setting per Visual Studio Solution.

  1. In Visual Studio menu go to WEB ESSENTIALS > Create solution settings:

    enter image description here

  2. A new folder and file will be created under your solution:

    enter image description here

    Open the generated file WebEssentials-Settings.json and change the property OutputDirectory under Less to your desired folder path:

    enter image description here

Hope that helps.

Upvotes: 4

phteven
phteven

Reputation: 1383

Have you tried going to TOOLS > OPTIONS > WEB ESSENTIALS > LESS and set a custom output directory?

Upvotes: 0

Related Questions