我正在尝试将以下命令作为 MSBuild 脚本的一部分运行:
for /R . %f in (*.targets) do copy /Y "%f" "C:\Program Files (x86)\MSBuild\Microso
ft\VisualStudio\TeamBuild"
这些命令通过以下方式在 exec 中实现:
<Exec WorkingDirectory="$(SolutionRoot)" Command="for /R . %f in (*.targets) do copy /Y "%f" "$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild"" />
该命令在控制台上运行良好,但是当尝试从 MSBuild 运行它时出现错误:
Task "Exec"
Command:
for /R . %f in (*.targets) do copy /Y "%f" "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild"
f" "C:\Program was unexpected at this time.
C:\Users\rd-build\AppData\Local\Temp\OH Test2\Continuous.BuildTargets\BuildType\TFSBuild.proj(98,5): error MSB3073: The command "for /R . %f in (*.targets) do copy /Y "%f" "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild"" exited with code 255.
Done executing task "Exec" -- FAILED.
有什么建议么?