chrisism / VSTS.Robocopy

Robocopy task for VSTS/TFS
MIT License
3 stars 4 forks source link

usage of standard TFS build-variables is not supported #1

Closed ronaldheinen closed 7 years ago

ronaldheinen commented 7 years ago

example use variable "%BUILD_ARTIFACTSTAGINGDIRECTORY%" in Source-parameter gives error: System.ArgumentException: Illegal characters in path. at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) at System.IO.Path.GetFileName(String path) at System.Management.Automation.Utils.IsReservedDeviceName(String destinationPath) at System.Management.Automation.Utils.NativeItemExists(String path, Boolean& isDirectory, Exception& exception) at Microsoft.PowerShell.Commands.FileSystemProvider.ItemExists(String path, ErrorRecord& error) Path "%BUILD_ARTIFACTSTAGINGDIRECTORY%" does not exist

chrisism commented 7 years ago

Sorry for the late reply. But you might want to use the values like $(Build.ArtifactStagingDirectory) etc. in the release or build pipeline. VSTS or TFS will automatically replace those. Using %NAME% will not be converted and that it will be treated as environment variables on the target machine.