TFS Integration Tools – Issue: TF205022: The following path contains more than the allowed 259 characters

You get error “TF205022: The following path contains more than the allowed 259 characters” when trying to migrate over some folders.

Figure: TF205022: The following path contains more than the allowed 259 characters

The full error message:

Figure: OMG that’s 264

You can’t make this stuff up!

Applies to

  • TFS Integration Platform


The mapped path for the destination TFS server is a might too long. In this case it is 264 (use rather than counting manually) and that is just too long for getting data into TFS.

If you end up in this position then you are looking at a manual intervention to fix. Folks that are using these folders can map them at a lower level and you can indeed do that with the Integration Plafrom and achieve the same result. However, you will be left in the same place as they currently are.

  1. Perform manual mappings of each folder that is causing problems
  2. Manually go a get, clean and checkin.

I am opting for #1 as it maintains my branching and history but the ultimate solution would be to think long and hard about the folder structure that you check into TFS. Its not just a network share and it comes with its own requirements.

Solution #0

By default the TFS Integration Platform uses “x:TfsIpData” for its workspaces. To gain a few much needed characters you can change this to “x:ipw”.

  1. Open “C:Program Files (x86)Microsoft Team Foundation Server Integration Tools”
  2. Edit “MigrationToolServers.config” as Admin
  3. Edit the AppSettings Value for Key “WorkSpaceRoot”

Figure: Alter the AppSettings Key

Now you have saved a few characters! Its not enough for me, but may be for you…

Solution #1

You will need to setup your mappings so that the target is shorter for all folders that end up longer. As you map all of the source and targets or the branches to the new shorter names the merge/branch history is still preserved.

In this case I want to rip out “XX XXXXXXX web content, banner ads, and images for localization” (63) and replace it with “ContentForLocalization”( 22) which will free up 41 characters for the path. If I also shorten “XXXXXXXXX XXXXXXXXX” to “XXX” I get another 16 characters and that I think puts me back into a safe place.

Figure: Shorten the path in the config

Now that the path has been shortened the Integration Platform should detect that the config has changed and reset the migration data. The problem is that these errors can be resolved due to a “Sequence contains no matching elements” error.

Figure: Sequence contains no matching elements

In order to proceed I will need to again recreate the session. Remembering to call “tf destroy” on the source that has already been migrated.

Did this help you save a few characters from your path?

  • James Waletzky

    Trying to understand this: is there an issue with the following line:

    Shouldn’t that be something like the line below, or did I misunderstand?


    Note the added “XXX” and the swap of the lines. Also, not using “XXXXX…” everywhere would help with readability.Thanks for the post.

    • James,

       First, thanks for the comment 🙂 The lines displayed are the lines of configuration actually used. I was mapping from $/[projectA] to $/[[projectB][ProjectA] so this is correct. The second filter shortens the lines. I understand that the “XXX”‘s are more difficult to read, but I needed to quickly obfuse the customer specific data and publish this KB. I do not spend an inordinate amount of time on KB’s (most posts take 2-3 days to write) and I prefer to get them out and update later if there are any issues.

  • Guest

    What a hot mess. Does anyone know if this is still an issue in TFS 2012? Or if this limit has been raised at all?

    • It has been increased ( I think to 400) in TFS 2012 but you are still beyond the Windows file limit. So while you can store something longer in TFS when you do a get, as you do for the Integration Platform, you will need to scope carefully to get it under the 254 Windows limit.

  • Lee Dalkin


    To clarify – can either of these solutions (although you do mention ‘recreating the session’ under Solution #1), or are there any others that might exist(?), be performed **without** having to stop the migration and start all over again from scratch?

    I’m 5 days (and 1/3 of the way through the ‘migration’ step) into a migration before hitting this issue 🙁

    Perhaps a working folder mapping for the particular sub folder effected can be added to the ‘Migration Toolkit Generated Workspace’ that has been created (mapping to “C;TfsIPData26…”) ??

    Ideally I would like a solution that doesn’t mean having to start all over again!