새 프로젝트에서 사용량을 줄이려고합니다. dotLess 및 System.Web.Optimization.Less packeges (Yet Another "Add LESS to your ASP.NET MVC Project" Post에 설명 된대로)를 설치했으며 로컬에서는 모든 것이 올바르게 작동합니다. 내가 프로젝트를 게시 할 때 IIS7 서버가 비어있는 CSS 파일 여기 /Content/Main/site?v=
asp mvc IIS7 less/sass 빈 파일
로 응답하는 것은 내 Web.config의
...
<configSections>
<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" />
</configSections>
<system.web>
<httpHandlers>
<add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler, dotless.Core" />
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
<add name="dotless" path="*.LESS" verb="*" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition=""/>
</handlers>
</system.webServer>
<dotless minifyCss="false" cache="true" web="false" />
그리고 내 BundleConfig.cs입니다
bundles.Add(new LessBundle("~/Content/Main/site").Include("~/Content/Main/Site.less"));
내 사이트에 CSS 확장을 추가 .less 파일 (Site.less.css
) 서버는 내용 (/Content/Main/site?v=K-FFpFNtIXPUlQamnX3qHX_A5r7TM2xbAgcuEmpm3O41
)으로 응답하지만 여전히 모든 변수 및 기타 정보가 포함 된 순전히 순수합니다.
동일 주소 : Bundle Transformer: Sass and SCSS
내가 무엇을 놓쳤는가?
나는 less를 모두 제거하고 'body {font-family : Arial; }'여전히 빈 상태가됩니다. 'site? v =' – Aray