N
N
NikWERT2021-10-21 09:27:02
MSBuild
NikWERT, 2021-10-21 09:27:02

What could be the problem when copying files with RoboCopy in MSBuild?

Greetings, when passing a parameter through Azure DevOps a list of modules to copy and substituting it in Files, quotes are always attached to the name of the first module from the list.

Example log from Azure:

C:\Windows\SYSTEM32\RoboCopy.exe "\\srv-vmb\Build Results\Out\Win32\Release" "\\srv-vmb\Build Results\Components\_Cumulative_patches\ModulesCumPatch\test_Win32\Release" "​SRDD.sys​" SVQ.sys Tuning.dll /S /MT /XD Signed_LSA ​SRDD SVQ Tuning 
     Running C:\Windows\SYSTEM32\RoboCopy.exe  "\\srv-vmb\Build Results\Out\Win32\Release" "\\srv-vmb\Build Results\Components\_Cumulative_patches\ModulesCumPatch\test_Win32\Release" "​SRDD.sys​" SVQ.sys Tuning.dll /S /MT /XD Signed_LSA ​SRDD SVQ Tuning
     Return Code 0. No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized.


The code for the copy call itself:
<MSBuild.ExtensionPack.FileSystem.RoboCopy Source="$(FolderModulesForCopy)\Win32\Release"
                                           Destination="$(CumModulesDir)\test_Win32\Release" 
                                           Files="$(CumFiles)" 
                                           Options="/S /MT /XD Signed_LSA @(ExcludeDir, ' ')"/>


CumFiles contains a semicolon separated list of modules SRDD.sys​;SVQ.sys;Tuning.dll. No list transformations helped to get rid of quotes, they appear only for the first element of the list, if you write the module manually at the very beginning in the script ahead, it will be successfully copied, and the first module in the list that follows it will still have quotes and will not be copied. Can anyone come across this?

Answer the question

In order to leave comments, you need to log in

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question