我定义了一个目标来调用exec
<Target Name="BuildInstaller" >
<Exec Command="attrib -R /S /D $(MSBuildProjectDirectory)\Environment\Installer\ServicePlatform\*.*" />
<Exec Command="dir *.* /s" />
</Target>
它完美无缺
但是如果我将UseCommandProcessor设置为True
<Target Name="BuildInstaller" >
<Exec Command="attrib -R /S /D $(MSBuildProjectDirectory)\Environment\Installer\ServicePlatform\*.*" />
<Exec Command="dir *.* /s" UseCommandProcessor="True"/>
</Target>
我明白了:
c:\Dev>/Q /C:\Users\MyUser\AppData\Local\Temp\tmp63250fcf10714224b92eeeb09e25b6f5.exec.cmd
'/Q' is not recognized as an internal or external command, operable program or batch file.
为什么会这样?我做错了什么?