Search code examples
azure-devopsazure-pipelinestfvc

Can devops agent build projects containing linked items (ie: shared items from other solutions")?


I am attempting to set up a DevOps build definition to build a VS2017 solution on an on-site agent.

After adding the standard Visual Studio Build step to the build pipeline, the build agent reports the error: "Error MSB3030: Could not copy the file "d:\agent_work..."

This seems to be happening for any LINKED item. These items were added to the project from other solutions ("add existing item->Add As Link")

The solution/project builds fine locally on developers PCs, but not on agent.

All that is really required is for the build step to copy these files to an output directory to be included in the build artifacts.

Properties for all linked items are set to "content & copy always".

Error MSB3030: Could not copy the file "d:\agent_work..." because it was not found.

Am I missing something basic here?


Solution

  • Solved the build error : "Error MSB3030: Could not copy the file "d:\agent_work..." because it was not found." by adjusting the mappings in preceding "get sources" step. After looking at the logs of the build it appeared that the agent was looking in "d:\agent" for some items and "d:\agent\s" for other items (and not finding them). Don't know why it was looking in the "s" sub-directoy. But anyway, the work-around was to include the "s" in the local path mappings for "Local path under $(build.sourcesDirectory)" (ie: s/MyLocalPath)