Variables in TFS Mappings on Visual Studio Online Team Builds

倾然丶 夕夏残阳落幕 提交于 2019-12-02 07:20:27

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/32402043/variables-in-tfs-mappings-on-visual-studio-online-team-builds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!