Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5992791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:34:59+00:00 2026-05-22T23:34:59+00:00

I have a TFS structure that looks something like this: $ -MainSoftwareBranch -Dev -Main

  • 0

I have a TFS structure that looks something like this:

$

-MainSoftwareBranch

-Dev

-Main

-Enterprise

-Project1

-Test

-TeamProjectA

-Main

-Enterprise

-Project1

-TeamProjectB

-Main

-Enterprise

-Project1

The end goal of this is that MainSoftwareBranch (MSB) contains all of the software that our company develops. When you need a piece of the software, you branch it in to your project branch and add a project reference wherever necessary.

At some time in the past, somebody who was not very familiar with our branching strategy branched Project1 directly from TeamProjectB to TeamProjectA instead of from MSB. I have tried to fix this and removed the project reference to $/TeamProjectB/Main/Enterprise/Project1 from where it was referenced in TeamProjectA. I branched Project1 from $/MSB/Main/Enterprise/Project1 and tried to add the project to the solution using “Add Existing Project…” and browsing to the local path where the csproj file is located. The project that gets loaded is the one from $/TeamProjectB though. I’ve removed the source control bindings, both within TFS and manually in the csproj and sln files, but nothing changes. It’s always “redirecting” my request to open the correct csproj file to the old one that is not valid.

Does anybody have any insight in to what could be causing this bizarre behavior?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:34:59+00:00Added an answer on May 22, 2026 at 11:34 pm

    A couple of things to check… but before you do any TFS/project structure modifications, I recommend checking in all current changes (for all teams), doing a get-latest to retrieve all of these changes, and making a backup of your entire local workspace folder.

    One point I need clarified to fully answer you… what sub-folders are being branched?  I.E. would you normally branch MSB/Main to TeamProjectA/Main, or would you branch individual projects, e.g. MSB/Main/Enterprise/Project1, Project2, etc.?

    First:  Check your workspace mappings… in Visual Studio, open the Source Control Explorer.  There is a workspace drop-down at the top of the window… pick “Manage Workspaces…” and edit your main workspace.

    Ideally there is only one working folder, mapping the root of your TFS project (‘$’ in your case) to a root local working folder.  If you have more than one working folder, make sure that the second one(s) are not subfolders of the root.  I.E. you shouldn’t have a separate folder for $/TeamProjectA/Main/Enterprise/Project1.  If you do, delete it and do a get-latest from the root.

    This is my first guess, because if TeamProjectB/Project1 is mapped to a TeamProjectA folder, it doesn’t matter how many times you change the references, you will always be loading Team B’s project.

    Second: You only do a branch one time.  Everything after that is merging, and you can only merge between immediate parent and children (unless you jump through hoops to manually mess with merging… a shootable offense in 9 countries).

    What that means is that so long as Project1 was branched from TeamProjectB, you will always be tied to TeamProjectB… You can fix the references in TFS for each Team and for the project, but when you merge TeamProjectA back to MSB, Project1 will not merge to MSB with everything else.

    It’s not clear in my mind what WOULD happen… either that project just doesn’t merge with anything, or it merges back to TeamProjectB‘s folder.  I highly doubt the latter is the case, but the former doesn’t make much sense, either… I’d almost expect TFS to short-circuit in some way.

    I’m guessing (complete WAG) that since you were able to branch Project1 from TPB to TPA that you’re not branching /Main or /Main/Enterprise… I hope the answer is that TFS won’t allow you to branch to a sub-folder of another branch.

    To Fix This

    1. Merge Project1 back to TPB.  Check in.

    2. Merge TPB/Project1 back to MSB.  Check in.

    3. Select TPA/Project1.  Go to File -> Source Control -> Branching and Merging -> Reparent.  Pick MSB's Project 1 as the new parent.  If your branches are done from /Main or /Main/Enterprise, you will have to reparent from whatever the branch root is.
      (Note that if TPB/Project1 was not rooted from MSB, this will not be an option… Go to plan ‘B’)

    4. Not sure if you can/need to check those changes in… do a check-in on both TPA and MSB to be safe

    Plan ‘B’: If that doesn’t work, you will have to delete TPA/Project1 and re-branch from MSB. Make sure everything is merged the whole way back to MSB (and checked in) before doing this.

    TFS may complain about re-branching to a pre-existing directory (because it keeps the delete history of TPA/Project1)… I don’t think it will, but if it does, you will have to use the command line tool to permanently remove TPA/Project1. Command is tf destroy… make sure you run it from the local TPA/Project1 folder, or tf may not be able to resolve the tfs server/path.

    HTH!
    James

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Underneath one Project in TFS we have multiple products. This is because for us,
Disclaimer: I'm stuck on TFS and I hate it. My source control structure looks
In our project, we'd like to have our TFS build put each project into
I have a build in TFS 2008 that gets triggered for every check-in, and
Using TFS, we have the following: A main baseline A development branch for each
We have added few folders/files in TFS which was deleted later. But, this folders
We have TFS 2008 our build set up to checkout all AssemblyInfo.cs files in
We have TFS installed in a US server. We need to login into VPN
My company recently purchased TFS and I have started looking into the code analysis
I currently have a source control folder in TFS with all of my source

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.