Unable to use Less.Parse using dotless in c#

会有一股神秘感。 提交于 2019-12-11 10:13:38

问题


I am following the link https://github.com/dotless/dotless/wiki/Using-.less to minify the css. I have include the dll and made Web.config changes.

However when the refer it in index.cshtml as Less.Parse , the Less namespace is not available and and getting the exception "The name Less does not exists in the current context"..

can somebody advise what am I missing?


回答1:


I have solved it.. just missing parent name space and conversion works like a charm

dotless.Core.Less.Parse(css)




回答2:


If you are using Visual Studio, Web Essentials has support for less.

http://vswebessentials.com/features/less

I often use it for :

  • .less to .css preview
  • View output from a .less compile
  • Extract variables/mixins

After build if you go to Output and select Web Essentials from the 'Show output from:' dropdown, you will see a date, time and the list of .less files that have compiled.



来源:https://stackoverflow.com/questions/21162836/unable-to-use-less-parse-using-dotless-in-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!