I am trying to run the following commands as part of a msbuild script:
for /R . %f in (*.targets) do copy /Y "%f" "C:\Program Files (x86)\MSBuild\Microso
ft\VisualStudio\TeamBuild"
The commands is implemented in an exec the following way:
<Exec WorkingDirectory="$(SolutionRoot)" Command="for /R . %f in (*.targets) do copy /Y "%f" "$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild"" />
The command works fine from console, but when trying to run it from MSBuild i get the error:
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.
Any suggestions?