AWestEng
asked on
TFS 2010: Delete project within Team Project (permanently)
Hi
How do I delete a project within my Team project, permanently. If dlete the project it will be marked as deleted in source control, but I want to remove it completely.
I don't wan't to delete the hole Team Project, just a project inside my solution.
I found this, dont know if this is the only way? is there any UI for doing this?
I want to delete the project WindowsFormApplication1.
tf destroy $/[TeamProjectName]/Window sFormAppli cation1 /preview /startcleanup /login:[Name],[pass] /collection:http://[server-name}: 8080/tfs/D efaultColl ection
How do I delete a project within my Team project, permanently. If dlete the project it will be marked as deleted in source control, but I want to remove it completely.
I don't wan't to delete the hole Team Project, just a project inside my solution.
I found this, dont know if this is the only way? is there any UI for doing this?
I want to delete the project WindowsFormApplication1.
tf destroy $/[TeamProjectName]/Window
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
when you are ready to run the command , don't forget to drop the /preview parameter, this just simulates the action & does nothing else .
ASKER
is there any C# code for doing the same as ts, I'm writing my own UI to delete stuff from TFS
ASKER
This what I have now.
I have tried to run this code on ProjectCollections that I thought was already completely deleted, but apparently not. but not according RegisteredTfsConnections.G etProjectC ollections ();
But then the method (teamProjectCollection.Ens ureAuthent icated();) throws an exception that I dont have the authorization to connect to this collection
I have tried to run this code on ProjectCollections that I thought was already completely deleted, but apparently not. but not according RegisteredTfsConnections.G
But then the method (teamProjectCollection.Ens
using (TfsTeamProjectCollection teamProjectCollection = new TfsTeamProjectCollection(
new Uri(String.Format("{0}/{1}", this.server, projectCollectionName)),
new NetworkCredential(String.Format("{0}\\{1}", this.domianName, this.username), this.password)))
{
teamProjectCollection.EnsureAuthenticated();
TeamProjectDeleter projectDeleter = new TeamProjectDeleter(teamProjectCollection, projectCollectionName, true);
projectDeleter.StatusEvent += new TeamProjectDeleter.StatusEventHandler(this.StatusUpdate);
projectDeleter.ExcludeWss = false;
projectDeleter.Delete();
}
I am not sure why would you want to reinvent the wheel here, Project collections , team projects are deletable from the TFS admin console out of the box , also the tf destroy command does work to permanently delete objects under source control.
However with regards to the error you encounter in your code, Please look into Impersonation samples in the SDK , you will need to impersonate first before TFS identifies you and allows you to perform any source control operations.
However with regards to the error you encounter in your code, Please look into Impersonation samples in the SDK , you will need to impersonate first before TFS identifies you and allows you to perform any source control operations.
ASKER
But I can only see solutions or project collections, I can't see projects inside a solution uisng the TFS Admin, I can only delete them fron the Solution Explorer, and if you do that it wont be permanently deleteed. that is when you will use the tf destory command, that is what I'm trying to do here, but with a GUI instead of using cmd
ASKER
and the TFs admin don't take away the sharepoint sites when deleting a collections,
so I like to have a GUI that will take away.
Site
Collection
dB
and all other things that is connected to a Project collection
and also want to list all the deleted projects, so I can excute a destroy command on them, If I neeed to clean up abit. :)
you know what I mean..
so I like to have a GUI that will take away.
Site
Collection
dB
and all other things that is connected to a Project collection
and also want to list all the deleted projects, so I can excute a destroy command on them, If I neeed to clean up abit. :)
you know what I mean..
ASKER
but I will check out the SDK., thx man :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thx man