Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Team Foundation Server 2015 Cookbook

You're reading from   Microsoft Team Foundation Server 2015 Cookbook Over 80 hands-on DevOps and ALM-focused recipes for Scrum Teams to enable the Continuous Delivery of high-quality Software... Faster!

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781784391058
Length 340 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Tarun Arora Tarun Arora
Author Profile Icon Tarun Arora
Tarun Arora
Tarun Arora Tarun Arora
Author Profile Icon Tarun Arora
Tarun Arora
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Team Project Setup FREE CHAPTER 2. Setting Up and Managing Code Repositories 3. Planning and Tracking Work 4. Building Your Application 5. Testing Your Application 6. Releasing Your Application 7. Managing Team Foundation Server 8. Extending and Customizing Team Foundation Server 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:
    Option1
  3. Select the Fabrikam Team Project and click on Delete:
    Option1
  4. In the Delete Team Project window, select Delete external artifacts and Delete workspace data. Click on Delete button to continue.
    Option1
  5. The deletion workflow is triggered, flip to the Status tab to track the progress:
    Option1
  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
    
    Option 2

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.
You have been reading a chapter from
Microsoft Team Foundation Server 2015 Cookbook
Published in: Jan 2016
Publisher:
ISBN-13: 9781784391058
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime