Я пытаюсь использовать связывание MVC4 для группировки некоторых из моих меньших файлов, но похоже, что путь импорта, который я использую, отключен. Моя структура каталогов:
static/
less/
mixins.less
admin/
user.less
В user.less я пытаюсь импортировать mixins.less, используя это:
@import "../mixins.less";
Это использовалось для меня раньше, когда я использовал chirpy с бесчисленным количеством, но теперь я заметил, что ELMAH злится на меня, говоря это:
System.IO.FileNotFoundException:
You are importing a file ending in .less that cannot be found.
File name: '../mixins.less'
Я должен использовать другой @import
с MVC4?
Дополнительная информация
Здесь менее класс и код global.asax.cs, который я использую, чтобы это сделать:
LessMinify.cs
...
public class LessMinify : CssMinify
{
public LessMinify() {}
public override void Process(BundleContext context, BundleResponse response)
{
response.Content = Less.Parse(response.Content);
base.Process(context, response);
}
}
...
Global.asax.cs
...
DynamicFolderBundle lessFB =
new DynamicFolderBundle("less", new LessMinify(), "*.less");
BundleTable.Bundles.Add(lessFB);
Bundle AdminLess = new Bundle("~/AdminLessBundle", new LessMinify());
...
AdminLess.AddFile("~/static/less/admin/user.less");
BundleTable.Bundles.Add(AdminLess);
...