I did however run into an issue when I deployed my development code to a production server. It turns out that the Visual Studio 2010 web server handles the dotlesscss DLL differently from IIS 7.5. In a nutshell, to use dotlesscss in both environments (local, production) without having to made changes to one of the environments the setup I use is:
- Set my web project to use IIS Express (separate download from Microsoft).
- Add the following items to my web.config file
xml version="1.0" encoding="utf-8"?>
<configuration>
   <configSections>
      <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" />
   configSections>
   <system.web>
      <compilation debug="true" targetFramework="4.0" />
      <pages>
         <controls>
            <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
         controls>
      pages>
   system.web>
   <system.webServer>
      <handlers>
         <add name="dotless" type="dotless.Core.LessCssHttpHandler,dotless.Core" path="*.less.css" verb="*"/>
      handlers>
   system.webServer>
   <dotless minifyCss="false" cache="false" />
configuration>

 
 
No comments:
Post a Comment