locked
TFS 2013 - Cannot delete team project RRS feed

  • Question

  • Hello,

    please could you help me with the following:

    I create a team project by mistake and need to delete it.

    I'm a team project administrator for this project, but I cannot delete it.

    The Delete option is greyed out  when I try the Web UI (see below)

    When I try a command line I have an error message: 

    Deletes the Team Project from Team Foundation. To use this command, you must be
    a member of either the Team Foundation Server Administrators group or a member of the Project Administrators group for the project you are deleting. 

    Can't figure out why as being a project admin for this project I should be able to delete it.

    The project is blank and hasn't go any code in the source control. The only  objects it has in it are a fre workitems which are  as removed.



    Andrei

    Monday, July 31, 2017 10:21 AM

Answers

  • Hi Andrei,

    You are trying to delete a default Team in a team project, not a team project (The default Team is not allowed to delete). And TFS 2013 doesn't support deleting a team project on Web UI (It's a new feature in TFS2015.2 and later).

    To delete a team project in TFS 2013, you can use the following options:

    1. Using the Administration Console, you can delete a team project from a team project collection:

    Details, you can refer to this website: https://www.visualstudio.com/en-us/docs/setup-admin/delete-team-project

    2. You can use the TFSDeleteProject command line tool to delete a team project:

    TFSDeleteproject [/q] [/force] [/excludewss]/collection:URL TeamProjectName

    Details, you can refer to this website: https://www.visualstudio.com/en-us/docs/setup-admin/tfs/command-line/tfsdeleteproject-cmd

    Best regards,

    Xinxin


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by chamindacMVP Tuesday, August 1, 2017 7:39 AM
    • Marked as answer by Andreyni Tuesday, August 1, 2017 9:15 AM
    Tuesday, August 1, 2017 3:26 AM
  • Hi Andrie,

    Please use below command to delete team project from TFS.

    TFSDeleteProject.exe /collection:"<collection URL>" "<teamproject name>" /q

    Thanks,

    Raj


    Raj

    • Proposed as answer by chamindacMVP Tuesday, August 1, 2017 7:39 AM
    • Marked as answer by Andreyni Tuesday, August 1, 2017 9:15 AM
    Tuesday, August 1, 2017 6:23 AM

All replies

  • Hi Andrei,

    You are trying to delete a default Team in a team project, not a team project (The default Team is not allowed to delete). And TFS 2013 doesn't support deleting a team project on Web UI (It's a new feature in TFS2015.2 and later).

    To delete a team project in TFS 2013, you can use the following options:

    1. Using the Administration Console, you can delete a team project from a team project collection:

    Details, you can refer to this website: https://www.visualstudio.com/en-us/docs/setup-admin/delete-team-project

    2. You can use the TFSDeleteProject command line tool to delete a team project:

    TFSDeleteproject [/q] [/force] [/excludewss]/collection:URL TeamProjectName

    Details, you can refer to this website: https://www.visualstudio.com/en-us/docs/setup-admin/tfs/command-line/tfsdeleteproject-cmd

    Best regards,

    Xinxin


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by chamindacMVP Tuesday, August 1, 2017 7:39 AM
    • Marked as answer by Andreyni Tuesday, August 1, 2017 9:15 AM
    Tuesday, August 1, 2017 3:26 AM
  • Hi Andrie,

    Please use below command to delete team project from TFS.

    TFSDeleteProject.exe /collection:"<collection URL>" "<teamproject name>" /q

    Thanks,

    Raj


    Raj

    • Proposed as answer by chamindacMVP Tuesday, August 1, 2017 7:39 AM
    • Marked as answer by Andreyni Tuesday, August 1, 2017 9:15 AM
    Tuesday, August 1, 2017 6:23 AM
  • Hi Xinxin, Raj,

    Many thanks for your response. 

    I managed to delete the project using the command line:

    "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\TFSDeleteProject.exe" /collection:"<collection URL>" "<teamproject name>" /q 

    Yesterday I tried the Developer Command Prompt for VS2013 and used TFSDeleteProjet without full path (I found out that I have 3 instances of TFSDeleteProjec).
    I'm not sure if the right version of TFSDeleteProject was used and that might be the reason why I got permissions error.

    The issue is resolved.

    Thank you again for your help!



    Andrei

    Tuesday, August 1, 2017 9:33 AM