Book Image

Microsoft Team Foundation Server 2015 Cookbook

By : Tarun Arora
Book Image

Microsoft Team Foundation Server 2015 Cookbook

By: Tarun Arora

Overview of this book

Team Foundation Server (TFS) allows you to manage code repositories, build processes, test infrastructure, and deploy labs. TFS supports your team, enabling you to connect, collaborate, and deliver on time. Microsoft's approach to Application Lifecycle Management (ALM) provides a flexible and agile environment that adapts to the needs of your team, removes barriers between roles, and streamlines processes. The book introduces you to creating and setting up team projects for scrum teams. You'll explore various source control repositories, branching, and merging activities, along with a demonstration of how to embed quality into every code check-in. Then, you'll discover agile project planning and management tools. Later, emphasis is given to the testing and release management features of TFS which facilitate the automation of the release pipeline in order to create potentially shippable increments. By the end of the book, you'll have learned to extend and customize TFS plugins to incorporate them into other platforms and enable teams to manage the software lifecycle effectively.
Table of Contents (16 chapters)
Microsoft Team Foundation Server 2015 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Deleting a Team Project


Deleting a Team Project permanently removes data associated with that project from the database. The data cannot be recovered later. Therefore, you should save Team Project data that you might want to access later. In this recipe, you'll learn how to delete a Team Project using the TFS Admin Console and the command line. We will also review the difference between the two approaches.

Getting ready

In order to delete the Team Project, you should be a member of the following groups:

  • Team Foundation Administrators group

  • SQL Server Administrators group

  • Farm Administrators group for SharePoint products (this is only required if TFS has been configured to integrate with SharePoint)

In this recipe, we'll review the two available options to delete a Team Project. The first option is to delete it from the TFS Admin Console, and the other option is to delete it from the command line. When a project is deleted from the admin console, any associated reports and SharePoint portal projects need to be manually deleted. The TFSDeleteProject command-line tool deletes all artifacts.

How to do it...

Option1

First let's look at how to delete the Team Project from the Team Project Administration Console:

  1. Log into the server that hosts your Team Foundation Application Tier.

  2. Open the Team Foundation Administration Console window and, from the left panel, click on Team Project Collections. Click on the Team Projects tab to see projects in the default collection:

  3. Select the Fabrikam Team Project and click on Delete:

  4. In the Delete Team Project window, select Delete external artifacts and Delete workspace data. Click on Delete button to continue.

  5. The deletion workflow is triggered, flip to the Status tab to track the progress:

  6. While all links to the project portal will be removed from Team Web Access, the SharePoint site that acts as the portal will need to be deleted manually from SharePoint Central Administration.

Option 2

Now, let's look at how to delete the Team Project using the tfsdeleteteamproject command-line tool:

  1. Open the Visual Studio 2015 Command Prompt. Alternatively you could open up a command prompt and change the directory to %programfiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE.

  2. Run the following command:

    tfsdeleteproject /q /force /collection:http://tfs2015:8080/tfs/ Fabrikam
    

The command-line utility offers a few more switches:

  • /q: This is an option switch; it enforces quite mode wherein no prompts are raised for confirmation during the deletion process.

  • /force: This is an optional switch; it enforces that the deletion process should continue even if some components cannot be deleted.

  • /excludewss: This is an optional switch. If you do not want to delete the SharePoint site associated with the Team Project, use this switch.

How it works...

The tfsdeleteproject command carries out the deletion in two phases. The first phase deletes the project data that includes data in version control, build and test manager, components of the Team Project in Team Explorer, Work Items, and any Work Item fields that exclusively belong to the Team Project. The next phase deletes the project websites. This includes any reports associated to the Team Project as well as project portals on SharePoint.

Note

If you try to access a Team Project that has been deleted, you are likely to get this error message. TF200016: The following project does not exist. Verify that the name of the project is correct and that the project exists on the specified Team Foundation Server.

The following data may remain undeleted when using tfsdeleteproject:

  • Team Project data in the cube: The Team Project data in the cube will only be removed with the next rebuild. The default rebuild for the warehouse is set to 2 hours.

  • 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. These files need to be manually removed from the folder locations.

  • Shared Work Item tracking metadata: 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 code in the shelveset is from multiple Team Projects.