0
我试图使用一个构建脚本运行dotless.compiler.exe编译我.LESS文件到.min.css上构建:无点的编译器退出,代码为-1 - MSBuild的
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/MsBuild/2003">
<!--
This MSBuild Script will compile all [*.less] files in the /CSS folder to their [*.min.css] counterparts.
-->
<ItemGroup>
<LessFiles Include="Styles\*.less" />
</ItemGroup>
<Target Name="CompileDotlessCss" AfterTargets="AfterBuild">
<ItemGroup>
<Binaries Include="*.dll;*.exe"/>
</ItemGroup>
<!-- Compile dotLess CSS into minified full CSS -->
<Exec Command="[MSBuild]\dotless.compiler.exe -m %(LessFiles.FullPath) $([System.String]::Copy('%(LessFiles.FullPath)').Replace('.less','.min.css'))" />
</Target>
</Project>
但是,当我建我得到:
The command "[MSBuild]\dotless.compiler.exe -m C:\Source Control\MyProject\MyProject.Web\Styles\main.less C:\Source Control\MyProject\MyProject.Web\Styles\main.min.css" exited with code -1.
我怀疑它做任何与源代码控制或仅仅是文件路径已在“源头控制”文件夹中的空间其实在我的项目中。
如何在引号中包装路径(因为命令本身在引用中)?
如果它是源控制因素,并且因为文件被锁定而失败(我尝试使用检入的文件构建)..我该如何处理这个问题?我显然希望让我的项目受到源代码控制。