Simon Epskamp
Simon Epskamp

Reputation: 9976

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"

Upvotes: 5

Views: 1255

Answers (2)

David Walschots
David Walschots

Reputation: 12670

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.

Upvotes: 3

Paul Knopf
Paul Knopf

Reputation: 9786

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.

Upvotes: 1

Related Questions