Reputation: 3465
I'm having a path issue.
I've got a build definition task that successfully publishes an artifact called metadatapreprocessor.exe to the artifacts location. Here's what the publish to artifacts task looks like:
Path to Publish:
Task#1: $(Build.SourcesDirectory)/MetadataPreprocessorRunner/bin/Debug/MetadataPreprocessor.exe
Artifact Name: MetadataPreprocessor
I've got a command line task to run the artifact named MetadataPreprocessor.exe:
Tool:
$(Build.ArtifactStagingDirectory)\MetadataPreprocessor\MetadataPreprocessor.exe
Arguments: --MetadataRelativePathFromFileSystem=$(Build.SourcesDirectory)\submodules\Graph_Metadata\input_metadata.xml
It appears that I'm properly referencing the executable in the staging area as I'd expect to a see MetadataPreprocessor.exe is not recognized as an internal or external command... if I wasn't finding that executable.
Upvotes: 0
Views: 442
Reputation: 33698
You are publishing the files to the server, so it isn’t in the artifact folder ($(Build.ArtifactStagingDirectory)), that’s why it can’t find the path specified.
You can add Copy Files task to copy the files from sources directory to artifact folder. (Source Folder: $(Build.SourcesDirectory)
; Contents:**\MetadataPreprocessor.exe
; Target Folder: $(Build.ArtifactStagingDirectory)
).
Upvotes: 1