gpt4 book ai didi

css - 如何设置 ASP.NET MVC 5 使用 dotless/LESS

转载 作者:行者123 更新时间:2023-11-28 08:24:06 24 4
gpt4 key购买 nike

谁能告诉我如何在 MVC 5 中使用无点/LESS?

我尝试使用以下方法从 NuGet 安装 dotless:

install-packege dotless

但是当我运行我的元素时出现这个错误:

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
Most likely causes:
This application defines configuration in the system.web/httpHandlers section.

最佳答案

system.web/httpHandlers用于 IIS 6,所以如果这不是您的选择(例如您使用 IIS 7+),只需删除 httpHandlers来自 web.config 的部分

或者不删除 httpHandlers只需添加 validateIntegratedModeConfiguration选项进入 system.webServer部分。

<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
...

这些链接对于如何使用 dotless 很有用:

http://www.brendanforster.com/blog/yet-another-implement-less-in-aspnetmvc-post.html

http://www.asp.net/mvc/overview/performance/bundling-and-minification

Dotless - Can't reference less variable in separate file with MVC Bundling

关于css - 如何设置 ASP.NET MVC 5 使用 dotless/LESS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28611218/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com