3

I've got an automated build in TFS 2010 with the following workspace:

$/Program 1   $(SourceDir)\Program 1
$/Core        $(SourceDir)\Core

I then build both the core projects and the program 1 specific projects as part of the build. However, in doing bug fixes for a previous version, I need to get a specific label of the core files, but the latest for program 1 files. How can I change the workspace for only the Core directory to get by the label instead of getting the latest.

I know I can create a branch from the label for the Core folder, but since the bug fix is only in the Program 1 files, I don't want to create a new branch that has no changes in it.

Ezweb
  • 218
  • 2
  • 14

1 Answers1

1

So you have an Solution that imports code from different TeamProjects.
That's not quite an optimum setup, one more flexible alternative could be the following:

$/Program1
    /SharedSources
       /Core_branch
          Core.csproj
    /Sources
       /Program1
          Program1.csproj
       /Program2
          Program2.csproj
       Sources.sln

If you had setup your SCM-structure like that, you would just have to define the following in your build definition:
$/Program1 $(SourceDir)

So, if you had an issue on a past version of Program1, you could proceed with a Hotfix branch and not face your current challenge . An excellent resource on general TFS branching & solution shaping in source control can be found here.

On your specific question "How can I change the workspace for only the Core directory to get by the label instead of getting the latest.":
In you own Workstation/Workspace, you could get a past version & then use Cloak to exclude Core from a following GetLatest. This can enable you to conduct analysis, even create shelvesets containing changes within Program1 that fix any bugs.
But, since cloaking isn't usable during build (see here for an interesting post), I believe you are eventually forced to proceed with a branch, in order to get your fixes build.

Community
  • 1
  • 1
pantelif
  • 8,524
  • 2
  • 33
  • 48
  • I agree that the solution layout isn't ideal. However, we also don't necessarily want a branch for every program; most programs use the same core version. Thanks for the links to the branching document, I'll read over them for future improvements to our folder layout. – Ezweb Feb 09 '12 at 21:42