Dotless using different folder

107 views Asked by At

I have DotLess 1.4.1 installed (Asp.Net 4.0).

My less directory structure is:

/assets/styles/*.less

I'm now looking at bootstrap and although I'll probably change the default directory structure, bootstrap will be inside its own folder. At the moment it is located:

/content/bootstrap/*.less

I've tried

@import "grid.less"
@import "/content/bootstrap/grid.less"
@import "../../content/bootstrap/grid.less
@import "./../../content/bootstrap/grid.less

Amongst many other variations.

I have a build event like this:

“$(SolutionDir)packages\dotless.1.4.1.0\tool\dotless.Compiler.exe” "$(ProjectDir)assets\styles\main.less” “$(ProjectDir)assets\styles\main.css”

Anyone experienced this kind of issue or have an idea as to how it can be solved?

1

There are 1 answers

0
Rytmis On

Your problem is that dotless uses the current directory to look for imports even when the initial file is not in the current directory. If you're comfortable working with MSBuild files, you can switch the working directory for the exe call.