.lessファイルを.cssファイルに解析するために使用する LessTransform クラスは次のとおりです。
public class LessTransform : IBundleTransform
{
public void Process(BundleContext context, BundleResponse response)
{
response.Content = dotless.Core.Less.Parse(response.Content);
response.ContentType = "text/css";
}
}
クラスbootstrap.cssを使用して、ダウンロードしたファイルを解析しようとしています。LessTransformメソッドが実行されているとき、最初response.Contentは Bootstrap の内容を持っています。
への呼び出し後dotless.Core.Less.Parse()、response.Contentは空白です。パーサーは静かに失敗しています。
なんで?