Search code examples
asp.net-mvcazuredotless

My dotless is not working on azure, internal error


http://s-projects.cloudapp.net/ProjectManager

When i run the site on my local machine from visual stduio it works.

I also noticed when looking at the .less file one local site, all the imports are compiled to one file.

on azure

the link in the html links to a file with :

@import"skin.less";@import"base.less";@import"site.less";@import"style2.less";

and the following i also found:

GET http://s-projects.cloudapp.net/ProjectManager/Content/base.less 500 (Internal Server Error) ProjectManager:13
GET http://s-projects.cloudapp.net/ProjectManager/Content/site.less 500 (Internal Server Error) 

Solution

  •         var cssTransformer = new CssTransformer();
            //var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();
            var css = new Bundle("~/Content/css")
            .Include("~/Content/style.less");
            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;
            bundles.Add(css);
           // bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/style.less"));
    

    Above works.