public static void AssemblyCleanup() { //ITeamProjects teamProjectCollections = TeamProjectFactory.CreateTeamProjectMananger(TestConstants.TfsCollectionUri, TestConstants.DefaultCredentials); //foreach (string projectName in teamProjectCollections.ListTeamProjectNames()) //{ // teamProjectCollections.DeleteTeamProject(projectName, true, false); //} ITeamManager teamManager = TeamManagerFactory.GetManager(TestConstants.TfsTeamProjectDetail); foreach (var team in teamManager.ListTeams()) { if (team.TeamName != TestConstants.TfsTeamProjectName + " Team") { teamManager.DeleteTeam(team.TeamName); } } }