Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dotlesscss @import statement: can't find file. Using Combres

In an asp.net mvc 3 project, i'm using Combres to combine and minify my CSS files. I'm using the dotlesscss filter for fancy css extras such as variables.

However, when i try to use the dotlesscss @import statement (see importing at bottom of page), css generation failes with the following error:

Could not find a part of the path 'C:\Program Files (x86)\IIS Express\colors.less'.

It's clear that the dotless compiler is looking in the wrong directory, however: how to fix this?

[edit]: as requested: i tried the following synaxes:

@import "Colors.less"
@import "~/Content/Colors.less"
like image 750
Simon Epskamp Avatar asked Oct 09 '22 15:10

Simon Epskamp


2 Answers

Use the DotlessCssCombineFilter instead of the DotlessCssFilter. Then remove the @import statements from your *.less files, and instead import the *.less files in the right order inside the resourceSet.

like image 98
David Walschots Avatar answered Oct 12 '22 19:10

David Walschots


The accepted answer is a work around, not a fix.

Here is the fix to the issue and here is the suggestion to the Combres team.

like image 27
Paul Knopf Avatar answered Oct 12 '22 18:10

Paul Knopf