One of the things I learned while setting up a virtual Team Foundation Server (TFS) environment is that there are definitely a few “gotchas.”  I encountered one of these while writing up some documentation on how to integrate a Web Application Project (WAP).

Before I began documenting the procedure, I went through and confirmed that everything would work.  When I was finished, I figured I would delete the Team Project and start over.  However, this didn’t work as I expected.  Here’s what I did:

  1. Created Team Project.
  2. Added my WAP to the Team Project source control.
  3. Created a new Build Type.
  4. Ran the new build.  Worked fine.
  5. Deleted the Team Project.
    • Clicked Start -> All Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt
    • Typed the command: TFSDeleteProject /Server:<ServerName> <TeamProjectName>
  6. Created a new Team Project with the same name.
  7. Added the WAP to the Team Project source control.
  8. Created a new Build Type.
  9. Ran the build and received the following error:

TF50608: Unable to retrieve information for security object $PROJECT:vsts:///Classification/TeamProject/<guid, it does not exist.

TF50608: Unable to retrieve information for security object $PROJECT:vsts:///Classification/TeamProject/<guid, it does not exist.

Turns out that when you delete a Team Project, it isn’t really deleted.  Parts of the project, including version control and work items, are maintained in the Team Foundation Data Warehouse and aren’t removed when the project is deleted.  Consequently, when you recreate a Team Project there is lingering data.

This is pretty disappointing; it seems that, for all intents and purposes, TFS is corrupt.  The only way I could move forward was to create a new Team Project with a different name.

Anyone have any insight?

  • http://colin.rockstarguys.com Colin Bowern

    When they start saying that delete project "permenantly deletes" the content as a new feature in TFS 2008 I suspect you are seeing the oversight in the v1 release:

    TFSDeleteProject now permanently deletes (destroys) version control content (new) (RTM)

    (from http://blogs.msdn.com/bharry/archive/2007/08/08/final-tfs-2008-feature-list.aspx)

  • http://blog.wadewegner.com/ Wade Wegner

    Colin, thank you for the link. I suspect you’re right.

    What a great list of new features and updates! Can’t wait for 2008!

  • Blake

    Couple of things I learned after following this:

    1) Can’t delete a Project unless you’re under the account that created it. Even Service accounts, TFS Admin, Admin Users Group couldn’t do it–had to be the owner, no matter how deep permissions go.

    2) Special characters and spaces in project names can be handled by enclosing the <Project Name> part of the above in quotes, e.g., TFSDeleteProject /server:MyServerName "My Project Name"

    Hope that information is helpful