arame3333
arame3333

Reputation: 10193

How does the build Agent Folder work on the Edit Build Workspace?

My build cannot pick up some of the projects in my application. They are stored in their own projects in TFS source control. I group them together in the Edit Build workspace;

These are the mappings: These are the mappings

The Build Agent folder does not let me simply put $(SourceDir). What is the impact of appending a folder name at the end as above? How do I get the Build Agent to pick up the projects from the correct folder locations?

Currently I get these error messages;

8 error(s), 3 warning(s)
$/STAS/Timesheet/Timesheet/Timesheet.sln - 8 error(s), 3 warning(s), View Log File
 C:\Builds\4\STAS\Timesheet\Sources\Timesheet\Timesheet.sln.metaproj: The project file "C:\Builds\4\STAS\Timesheet\Sources\Timesheet\..\..\..\..\StandardClassLibrary\StandardClassLibrary\StandardClassLibrary.csproj" was not found.
 C:\Builds\4\STAS\Timesheet\Sources\Timesheet\Timesheet.sln.metaproj: The project file "C:\Builds\4\STAS\Timesheet\Sources\Timesheet\..\..\..\EmailMessageRecord\EmailMessageRecord\EmailMessageRecord.csproj" was not found.

Upvotes: 2

Views: 2520

Answers (1)

jessehouwing
jessehouwing

Reputation: 114641

This is exactly how the feature is meant to be used. The $(Sourcedir) macro is replaced by the Build Agent path (as configured on the Build Agent):

BuildAgent Properties

Whichever path is configured here is placed into $(Sourcedir) and whatever you additionally configure in the mapping is used to create the final destination.

So what happens is that these solutions will all be downloaded to their own sub directory under the build working directory. The only think you'll need to look out for is that relative paths between folders in source control or in your local mapping need to match up with the destination folder structure you choose int he build definition's workspace mapping.

Upvotes: 2

Related Questions