Troubleshooting Team Project Creation and Deletion

When you create a team project, Team Foundation Server creates data objects on the application-tier server, the server that hosts SharePoint Products and Technologies, and the server that hosts SQL Server Reporting Services. When you remove a team project, Team Foundation Server removes those objects. However, an error can prevent Team Foundation Server from creating or deleting all the objects. To troubleshoot these problems, the following sections provide background information, links to other resources, and specific steps that help you determine the cause of the problem, fix the problem, and when necessary delete the remaining data objects.

  • Troubleshooting Failure to Create a Team Project

  • Troubleshooting Failure to Delete a Team Project

Use the guidance below to troubleshoot problems that arise when you create or delete a team project.

  • TFSDeleteProject Process

  • Data That May Remain Undeleted

  • Verify Team Project Components Are Deleted

  • Remove Remaining Components After Partial Project Deletion

  • Start the TFSVersionControl Administration Job

  • Increase the Time-Out Period

Troubleshooting Failure to Create a Team Project

When a team project creation activity does not successfully complete, some components may be created while others are not. If so, you should determine what caused the partial creation, delete the partially created project, resolve any issues, and then create a new team project.

Note

You may be unable to create a team project with the same name as a deleted team project. Some components of the deleted team project may be scheduled for deletion but not deleted. Review the information in TFSDeleteProject Process to determine how to delete all remaining components prior to creating a team project with a previously used name.

Use the following table to troubleshoot the failure to create a team project.

Symptom

Problem

Resolution

An error message indicates that you do not have permission to create a new team project, connect to a server, or access a server.

The user who tried to create the project has insufficient permissions.

Grant the user the necessary permissions on each server that hosts Team Foundation Server, SharePoint Products and Technologies, or Reporting Services. For more information, see How to: Set Team Foundation Server Project Lead Permissions.

Error TF30169: The New Team Project Wizard was unable to download the process template {0}.

Process templates are not available on the server that hosts SharePoint Products and Technologies.

Add process templates to the server. For more information, see How to: Retrieve and Restore Missing Site Templates.

Error TF30170: The plugin Microsoft.ProjectCreationWizard.Portal failed during task SharePointPortal from group Portal.

The version of Team Explorer is not compatible with the version of Team Foundation Server.

You must create the team project from a computer that is running the version of Team Explorer for Visual Studio Team System 2008, or you must update Team Explorer on those computers on which team projects are created. For more information, see How to: Upgrade Team Explorer for New Releases of SharePoint Products and Technologies.

Error TF30321: The name you typed is already used for another team project on the Team Foundation Server.

The name can be in use for any of the following reasons:

  • An active project uses this name

  • A project that uses this name has been flagged for deletion but has not yet been deleted

  • A project with this name was only partially created or only partially deleted

Try again using a unique project name, or review the information provided below in TFSDeleteProject Process to determine what steps to take to fully delete all components prior to creating a team project with a previously used name.

An error message indicates a problem connecting to a server, retrieving information from a server, or checking permissions to create projects.

A server in the Team Foundation deployment is incorrectly configured. This problem is especially common after a server move, failover, or other maintenance activity.

Use the /view option of the TfsAdmin ConfigureConnections command to verify that your server configuration is correct. For more information, see ConfigureConnections Command.

An error message indicates a problem with a plug-in.

 

See Troubleshooting the New Team Project Wizard.

Troubleshooting Failure to Delete a Team Project

Team project deletion can fail for any of the following reasons:

Problem area

Resolution task

The user who tried to delete the project has insufficient permissions. Permissions necessary to delete team projects are the same for creating team projects.

Important noteImportant Note:
the TFSProjectDelete command does not confirm that the user running the command has sufficient permissions prior to initiating the deletion process.

Grant the user the necessary permissions on each server that hosts Team Foundation Server, SharePoint Products and Technologies, or Reporting Services. For more information, see How to: Set Team Foundation Server Project Lead Permissions.

The deletion process did not complete within the timeout period, which by default is 10 minutes. This problem is most common when you delete a large project, a project with large amounts of data, or a project on a very busy network.

Review the project deletion process information in TFSDeleteProject Process to determine whether you should increase the timeout period, or run TFSProjectDelete again using the /force option.

An error message indicates that Team Foundation Server could not delete a component.

Review the project deletion process information in TFSDeleteProject Process to determine whether you should manually delete one a component or run TFSProjectDelete again, using the /force option.

A server in the Team Foundation deployment is incorrectly configured. This problem is especially common after a server move, failover, or other maintenance activity.

Check your server configuration using the /view option of the TfsAdmin ConfigureConnections command. For more information, see ConfigureConnections Command.

TFSDeleteProject Process

To delete a team project, you use the TFSDeleteProject command-line utility in two phases to delete each component and all data associated with that project. You can find the TFSDeleteProject tool in <drive>\Program Files\Microsoft Visual Studio 9\Common7\IDE on any computer that runs Team Explorer.

Important noteImportant Note:

TFSDeleteProject permanently destroys the team project, after which it cannot be recovered. You should backup all important project data before using TFSDeleteProject. For more information, see How to: Back Up Team Foundation Server.

Phase 1: TFSDeleteProject Deletes Project Data

In the first phase, TFSDeleteProject automatically performs the following steps to remove team project data:

  1. TFSDeleteProject flags the version control information for deletion, but does not immediately delete this information. The information includes all version control branches in the specified project, but no other branches outside of the project.

    • If a parent branch and a child branch are both in the project, TFSDeleteProject flags both for deletion.

    • If parent and child branches are in different projects, TFSDeleteProject flags only the specified branch.

    • If another project is a branch from the specified project, TFSDeleteProject flags only the specified project. When the specified project is deleted, the branch project becomes an orphan.

    The version control data that TFSDeleteProject flags is not deleted until the SQL Server job runs. This job is also called the TFSVersionControl Administration Job. By default, this job runs at midnight. Until this job runs, you cannot create a project with the same name as one flagged for deletion. To force the TFSVersionControl Administration job to run immediately, see Start the TFSVersionControl Administration Job.

  2. TFSDeleteProject immediately deletes build data, including information and core data, build definitions, build agents, and test results associated with the team project. The tool does not delete build drop locations. You do not need to delete the build drop location of an old team project before creating a new team project that uses the same build drop location.

    If the specified project contains a large amount of build data, the deletion might not finish within the timeout period. To work around this problem, see Increase the Time-Out Period, and then run TFSDeleteProject again.

  3. TFSDeleteProject immediately deletes work items and work item fields that belong to the specified project, and it deletes all non-shared metadata.

    If the specified project contains a large amount of work item data, the deletion might not finish within the timeout period. To solve this problem, see Increase the Time-Out Period, and then run TFSDeleteProject again.

If each of these steps completes successfully, the project node no longer appears in Team Explorer. If any one of the above steps fails to complete, the project node continues to appear in Team Explorer.

Phase 2: TFSDeleteProject Deletes Project Web Sites

In the second phase, TFSDeleteProject deletes the following data:

Important noteImportant Note:

These steps can take a long time to complete, and during that time they can degrade server performance.

  • TFSDeleteProject uses the Reporting Services APIs to delete reports on the server that hosts Reporting Services.

  • TFSDeleteProject uses the SharePoint Products and Technologies APIs to delete the project portal Web site from the server that hosts SharePoint Products and Technologies.

    Note

    Prior to deleting a team project, you can confirm that Reporting Services and SharePoint Products and Technologies are using the correct project URLs by running the TfsAdminUtil ConfigureConnections command. For more information on using this command, see ConfigureConnections Command.

If TFSDeleteProject successfully deletes all of the above data elements, it returns the message Done. To verify this result, see Verify Team Project Components Are Deleted.

If one or more components are not removed, you can rerun TFSProjectDelete using the /force option to instruct the tool to continue the deletion process even if it is unable to delete all data elements. With this option TFSDeleteProject, skips a component that it cannot delete, returns an error message, deletes the next component, and leaves the team project metadata and security settings intact.

Data That May Remain Undeleted

The following data might remain in the deployment after TFSDeleteProject successfully completes:

  • Team project data in the Team System cube. Team project data remains in the Team System cube until the cube is rebuilt, at which time the Warehouse ControllerService removes all of the historic build data that has been deleted from the Team Foundation databases. To rebuild the Team System cube, see How to: Rebuild the Team System Cube.

  • Build drop files and folders. Build binaries, build log files, and log files containing test results are published during the build process. The locations for these files are not deleted. If you want to remove these files, you must remove them manually.

  • Work item tracking metadata that is shared. TFSDeleteProject does not delete any metadata for work item tracking that is shared between team projects.

  • Version control shelvesets containing shared code. Version control shelvesets are not deleted if there is code in the shelveset from multiple team projects. The TfsVersionControl database may continue to store references to deleted team projects.

Verify Project Deletion

You can verify the success of a project deletion by confirming that the team project node no longer appears in Team Explorer, that its project portal Web site and reports folders no longer exist, and that the TFSVersionControl Administration Job has run and deleted the team project.

To verify that a team project has been successfully deleted

  1. Open Team Explorer and verify that the project does not appear as a project node.

  2. Open Internet Explorer and type the URL of the project portal Web site. Verify that the site no longer exists.

  3. In Internet Explorer, in the Address box, type the URL of the Reporting Services Web site using one of the following URL formats:

    • http://ReportingServices/Reports

    • **http://ReportingServices/Reports_**TFSInstance

  4. In Report Manager, click Show Details.

  5. Verify that the folder for the deleted team project no longer appears.

  6. Review the history of the TFSVersionControl Administration Job. For information on viewing the job history, see the procedure defined below, Start the TFSVersionControl Administration Job.

    Note

    The TFSVersionControl Administration Job is run at midnight by default. Version control data associated with the deleted team project is not deleted until after the TFSVersionControl Administration Job runs.

If either the reports or the Web site remain, see Remove Remaining Components After Partial Project Deletion. If the TFSVersionControl Administration Job has not run, to start it see Start the TFSVersionControl Administration Job.

Remove Remaining Components After Partial Project Deletion

If the project portal Web site and reports folder remain after you delete a team project, remove the site and folder manually.

Required Permissions

To perform these procedures, you must be a member of the Team Foundation Administrators security group or the Project Administrators security group. For more information, see Team Foundation Server Permissions and Team Foundation Server Default Groups, Permissions, and Roles.

To manually remove reports and the project portal Web site of a deleted team project

  1. Log on to the server that hosts Reporting Services for the team project that you deleted.

  2. Open Internet Explorer, and in the Address box type the URL of the Reporting Services Web site using one of the following URL formats:

    • https://localhost/Reports

    • **https://localhost/Reports_**TFSInstance

  3. In Report Manager, click Show Details.

  4. Select the checkbox for the team project that was deleted.

  5. Click Delete.

  6. Click OK to confirm that you want to delete the reports folder for the team project.

  7. To remove the project portal Web site of a deleted team project, see this page on the Microsoft Web site: How to: Create, Edit, and Delete Windows SharePoint Services Sites.

Start the TFSVersionControl Administration Job

The TFSVersionControl Administration Job performs maintenance on the Version Control database. By default, this job runs at midnight. Use the following procedure to start the job or to view the job history.

Required Permissions

To perform these procedures, you must be a member of the Administrators group for the Team Foundation databases. For more information, see Team Foundation Server Permissions.

To start the TFSVersionControl Administration job

  1. Log on to the data-tier server.

  2. Open the Start menu, point to AllPrograms, point to Microsoft SQL Server 2005 or Microsoft SQL Server 2008, and then click SQL Server Management Studio.

  3. In the Connect to Server dialog box, in Server type, click Database Engine,

  4. Type the name of the server to which you want to connect, and then click Connect.

    Note

    If SQL Server is installed on a cluster, type the name of the cluster, not name of the computer.

    Microsoft SQL Server Management Studio opens.

  5. Expand SQL Server Agent, and then expand Jobs.

  6. To start the job, right-click TFSVersionControl Administration Job, and then click Start Job.

  7. To view the job history, right-click TFSVersionControl Administration Job, and then click View History.

Increase the Time-Out Period

By default, the TFSDeleteProject command must complete within 10 minutes. If you want to delete a team project that is associated with a large amount of data, you can temporarily increase this time-out period.

Note

When you increase the time-out period, the change affects all Web service calls. In general, you want to keep the time-out period to within ten minutes to prevent Web service calls from degrading server performance and causing users to be locked out from using the user interface for long periods of time. Therefore, after the project is successfully deleted, you should change the time-out period back to 10 minutes.

Required Permissions

To complete these procedures, you must be a Windows Administrator on the application-tier server.

Important noteImportant Note:

Improperly modifying your computer's registry can cause your computer to become unstable. If you are not familiar with the registry, you should not add or remove entries, or modify it in any way.

To increase the time-out period for the TFSDeleteProject command

  1. Log on to the application-tier server.

  2. Click Start, click Run, type regedit, and then click OK.

  3. In the browser pane, expand HKEY_ LOCAL_MACHINE:

    • If the server runs a 32-bit operating system, expand: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\TeamFoundation\RequestSettings.

    • If the server runs a 64-bit operating system, expand: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432\Microsoft\VisualStudio\9.0\TeamFoundation\RequestSettings.

  4. If the TeamFoundation\RequestSettings key does not exist, follow these steps to create it:

    1. Right-click TeamFoundation, point to New, and click Key.

    2. Name the key RequestSettings.

    3. Right-click RequestSettings, point to New, and click DWORD Value.

    4. Name the new value DefaultTimeout.

  5. Right-click DefaultTimeout and choose Modify.

  6. In Value Data, type the time-out period in milliseconds, and then click Decimal.

    For example, to increase the time-out period to 30 minutes, type 1800000. To change the time-out period back to 10 minutes, type 600000.

  7. Click OK.

  8. On the File menu, click Exit.

See Also

Tasks

Troubleshooting the New Team Project Wizard

Concepts

Team Foundation Server Permissions

Team Foundation Server Default Groups, Permissions, and Roles

Other Resources

Troubleshooting Team Foundation Server