Search code examples
visual-studiotfsversion-controltf-cli

Unsupported pending change error when moving folder


I am trying to move a folder in TFS 2010. After coming to grips with the fact that TFS can't do this without losing the folder's history (see this question and users' responses to Microsoft), I tried the following TF.EXE command:

tf rename Apps "Test Main\Apps"

But I get an error message.

TF10169: Unsupported pending change attempted on team project folder $/Apps. Use the Project Creation Wizard in Team Explorer to create a project or the Team Project deletion tool to delete one.

The Apps folder does not appear to have any pending changes but I tried some other folders for good measure and got the same result.

I do not want to create or delete any Team projects. What am I missing?


Solution

  • $/Apps is not a folder, it is the root of a team project. Think of it as "C:\". You can create folders underneath it, but it's a special entity with its own set of rules.

    So, what does this mean for what you're trying to do? It looks like your goal is to rename the team project. Unfortunately, TFS 2010 does not support renaming team projects, although TFS 2015 and beyond do.

    If you want to rename the "Apps" team project, you will have to upgrade to a modern version of TFS, but at a minimum TFS 2015.

    Otherwise, you will have to manually create a new team project with your desired name and check in the source code. You won't be able to move it from within the source control explorer.

    However, keep in mind that there is more to a team project than just source code -- any work items or build definitions will not transfer to the new team project, and there is not a mechanism for moving them.

    So, your options are:

    1. Live with the name
    2. Upgrade to TFS 2015 or beyond (ideally the most recent version, of course)
    3. Create a new team project