2

In my ASP.NET MVC5 project I'm using Bundling/Minification and dotless together.

var commonCss = new StyleBundle("~/bundles/main.css").Include(
                "~/CSS/global.css",
                "~/CSS/header.less",
                "~/CSS/footer.css"
                );

commonCss.Transforms.Clear();
commonCss.Transforms.Add(new LessTransform());
commonCss.Transforms.Add(new ConfigurableStyleTransform(cssSettings));

return commonCss;

LessTransform() is from System.Web.Optimization.Less.

Intermittently I'm seeing the header.less file not being included in the bundle. Sometimes it will, sometimes it won't, without any code changes.

I've ran the LESS file through a validator and no issues found.

The only other times I've seen a file not being included in a bundle is when the file cannot be found, or theres a syntax issue. However this doesn't seem applicable for this instance.

What possible reasons are there for this file not being included in the bundle?

Curtis
  • 101,612
  • 66
  • 270
  • 352

1 Answers1

1

You might be hitting this bug in dotless. If that's the case, until it gets fixed, you can get around it by specifying disableParameters="true" in the dotless section of your Web.config.

Rytmis
  • 31,467
  • 8
  • 60
  • 69