Open a file in Visual Studio's CSS Source Editor

后端 未结 4 1817
小鲜肉
小鲜肉 2020-12-08 07:51

I am using Phil Haack\'s T4CSS T4 template based on .less

One bad thing about Phil\'s solution is that visual studio opens the .less files as plain text files rather

4条回答
  •  清歌不尽
    2020-12-08 08:28

    If you are using the dotless.Compiler.exe tool (as opposed to the http handler), there is nothing to say your files have to end with .less. I name my suffix my .less files with .css so that Visual Studio treats them like css files. E.g. my naming convention is:

    /css/common.less.css ==> /css/common.css

    I run the dotLess compiler as a post-build event, e.g.

    $(SolutionDir)\packages\dotless.1.1.0\Tools\dotless.Compiler.exe "$(ProjectDir)\css\common.less.css" "$(ProjectDir)\css\common.css"
    

提交回复
热议问题