I can't find a better place to report and describe this.
Cross-project imports failing with LESS 1.3.3
Suppose I've a solution like this (Project1 and 2 are folders but they are separate projects in the same solution):
- Project1
- Styles
- base.less
- Styles
- Project2
- Styles
- site.less
- Styles
Site.less contains only the following:
@import "../../Project1/Styles/base";
When saving this I get the following error:
Couldn't load Project1/Styles/base.less (404)
Note how the leading directory jumps are omitted.
This version of Web Tools contains LESS 1.3.3, changing the X:\Users\<username>\AppData\Local\Microsoft\VisualStudio\11.0\Extensions\<id>\Resources\Scripts\less-1.3.0.js file to a 1.3.0 one fixes the issue.
A workaround is to create a symlink (e.g. with DirLinker) in Project2 to the less file (or its folder) in Project2.
All imports failing with LESS 1.4.0b
Using the lastest LESS source by swapping the mentioned less compiler js file to the 1.4.0b source yields that import statements are not working at all (imagine an import "other" in site.less), all failing with the following error:
"Error LESS: 'd:/Users<my name>\Projects<path to the Styles folder with backslashes>/other.less' wasn't found (404)
Notice how backward slashes are used mixed up. Also if the path to other.less is a directory up (i.e. containing ../) that isn't resolved (i.e. is shown as part of the path in the error like <path to the Styles folder with backslashes>../other.less).
A "fix" is to edit lessc.wsf in the mentioned Scripts folder and starting from line 181 make the following modification:
var parser = new less.Parser({ filename: "wat" // Previously the variable input was referenced instead of the string });
I don't know how and why this solves the issue but it does.