Shane Courtrille
Shane Courtrille

Reputation: 14097

Variables in TFS Mappings on Visual Studio Online Team Builds

I have created a VSO build using the new Team build system which uses TFS as the Repository. I would like to introduce a variable into the Mappings -> Map value but when I do I get this error:

TF10122: The path '$/YourProject/${Build}' contains a '$' at the beginning of a path component. Remove the '$' and try again.

Is there a way to accomplish this or do I need to just hard code my Map path?

Upvotes: 2

Views: 2625

Answers (2)

aL3891
aL3891

Reputation: 6275

I also have this issue, i'd like to set the branch being built in order to have a single build that I can link to a single release (in vso), since the vso release system does not have global environment definitions.

Anyway, this used to be possible but they removed this capability without replacing it with something else, kinda annoying.

I worked around it by adding mappings to both my dev and main branch to different local folders and then using a variable to differentiate between them in the actual build steps. As long as you don't need to map a ton of branches this works, even though its a bit cumbersome.

Upvotes: 1

Vicky - MSFT
Vicky - MSFT

Reputation: 5010

Mappings on the Repository page are used to specify source control folder which contains projects that need to be built in the build definition. You can set it via clicking the Ellipsis (...) button, however, you can't include variables in the mapping path.

Upvotes: 2

Related Questions