Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dotless HttpHandler with VS2013 Preview

I have just installed the Visual Studio 2013 preview and run up my site. I've noticed that the less files which are used in my site are not being correctly transformed to css and are coming down as blank CSS files.

It appears something is going wrong inside the dotless httphandler as when I force minification for the bundle everything works correctly.

web.config

<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" />
...
<httpHandlers>
  <add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler, dotless.Core" />
</httpHandlers>
...
<handlers>
      <add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition="" />
</handlers>

The issue appears to go away if I force minification eg. System.Web.Optimization.BundleTable.EnableOptimizations = false; which suggests something is different in the way it processes the HTTP handler

like image 771
Not loved Avatar asked Jun 29 '13 00:06

Not loved


1 Answers

Try putting handleWebCompression="false" in the configuration for dotless (in the web config)

  <dotless minifyCss="false" cache="true" web="false" handleWebCompression="false" />
like image 76
Martin Booth Avatar answered Jan 01 '23 13:01

Martin Booth