我正在使用dotLess。
我按照他们的所有指示(看起来很简单)只有 4 个步骤 :)
我最小的 web.config 如下所示:
<configuration>
<configSections>
<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" />
</configSections>
<dotless minifyCss="false" cache="true" />
<system.web>
<httpHandlers>
<add type="dotless.Core.LessCssHttpHandler, dotless.Core" validate="false" path="*.LESS" verb="*" />
</httpHandlers>
</system.web>
<system.webServer>
<handlers>
<add name="LessHttpHandler" type="dotless.Core.LessCssHttpHandler, dotless.Core" preCondition="integratedMode" path="*.less" verb="*" />
</handlers>
</system.webServer>
</configuration>
我已经在我的内容文件夹中添加了我的 .less 文件(我正在使用 ASP.NET MVC - Razor ViewEngine)
我的布局有一个指向我的 .less 包含文件的链接:
<link rel="stylesheet/css" type="text/css" href="@Url.Content("~/Content/Site.less")" />
我还在我的 Web 应用程序中添加了对 dotless.Core.dll 的引用
然而,尽管我将页面主体背景设置为黑色的所有简单样式,但没有任何反应,由于某种原因它没有启动。
我在这里错过了什么吗?