Cannot pass two options at the same time to MSBuild.Community.Tasks.RoboCopy
Benoitlz opened this issue · 1 comments
declaring one Options="/XO" correctly output the cmd line for Robocopy ... /XO
The issue is when declaring two Options="/XO /XX"
Then the cmd line for Robocopy becomes ... "/XO /XX".
This is not correct, the cmd line for Robocopy should be ... /XO /XX
(without the double quotes)
I guess it comes from line 526 of msbuildtasks/Source/MSBuild.Community.Tasks/RoboCopy.cs.
I'm not sure how to solve it.
Thanks for looking into this.
Actually I solved this by creating a properties holder:
<ItemGroup> <RoboCopyOptions Include="/XO;/XX" /> </ItemGroup>
then using it this way:
<MSBuild.Community.Tasks.RoboCopy SourceFolder="$(MSBuildProjectDirectory)\misc" DestinationFolder="$(OutDirRoot)\$(BinariesDirName)" Options="@(RoboCopyOptions)">