Question

Okay, I have a couple inquiries:

1 - Let's say I have a solution that references several external projects. I want to reference specific Labels (that represent stable versions) on those external projects. I know that you can do this by doing a Get Specific Version by Label on those projects. But once you've done that, is there a convenient way to do a Get on the whole solution, and have it preserve all of the specific versions?

Ultimately, I would like to do a single Get and have it get latest where that is applicable and get specific versions where that is applicable. It seems frustrating to have to do separate Gets on all the projects.

2 - Is it possible to build binaries from labels? When an external project is a stable version that isn't going to change, it makes sense to just reference the binary. When you create a label and build it, does it generate binaries in a specific location for that label that can be referenced?

Was it helpful?

Solution

On your first question: While TFS allows you to grab sources by Label, there is no way to setup a a workspace configuration that is bound to a specific Label or Changeset for a specific path. The only thing I can think of would be to create a batch file which fetches the latest version:

tf get $/Project/Sources /Version:T /recusive

tf get $/Project/ComponentA /version:LMyLabelName1 /recursive

tf get $/Project/ComponentB /version:LMyLabelName2 /recursive

The way forward to do this is to publish your external references to a NuGet repository (can be your own) and then configure NuGet to get a specific version. A CI build can publish a new version to your NuGet server. And you can setup your own server so that you don't need to publish all your binaries to a public server.

On your second question: yes you can build by label in the Queue Build screen you can setup the version to build which will be built:

Queue Build - Get version option.

You can specify a Changeset number (C######), Label (LLabelname) etc. Any version spec will do (see the commandline docs for a explanation on version specs).

By default, no easy referencable name is generated if you build by label. I suspect that some clever build customization will allow you to drop the build output in a predefined folder based on the label name, but there is no such out-of-the-box functionality.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top