Delete a collection from TFS - tfs

I want to use a free tfs account for a sample project. So i created a free account on visualstudio.com and created 2 collections. And i want delete one them but i cannot delete it.
There is no any members in the collection. It doesn't allow me to delete. As you see on the screenshot, delete button is disabled. Also Is there any way that if i've an admin account, is possible to change or delete collections from visual studio?

I'm not sure how/if it applies to free TFS versions, but the following link shows how to delete Team Project Collections in general. Looks like doing it via command line tool is the way to go.
https://rules.ssw.com.au/do-you-know-how-to-delete-a-team-project-collection
Here is the main part:
On TFS server, open Administrative Command Prompt and change to TFS Tools Directory.
%programfiles%\microsoft team foundation server[versionnumber]\tools
Type the command:
TFSConfig Collection /delete /collectionName:[COLLECTION NAME]

You're mixing collections and team projects. You cannot create a collection in Team Foundation Service as of now. That may or may not change in the future. When you sign up, there is one collection created for you and that one will contain your team projects and you will need to live with that one. If you have a need to have another collection then you can sign up under another account. You can however delete team projects but not from the web UI. You will need to use the command line tool DaveShaw gave a link for. You can also check out the blog post below:
How to delete a team project from Team Foundation Service (tfs.visualstudio.com)

You look like you are trying to deleted a "Team" from a "Team Project"? You have to have at least one "Team" in a "Team Project", and that will have the same name as the "Team Project".
If you are wanting to delete the entire "Team Project" (containing all the Work Items, Source, Builds, etc), you can do it using the tfsdeleteproject command line tool.

Even we had similar issue. Unfortunately we had deleted a Collection DB without Stopping and Detaching the collection from TFS admin console in TFS 2018. Later we tried to detach the collection, but no luck. Initially we had ignored this issue since it was test TFS collection and that too in QA server. Later during up-gradation to Azure DevOps 2019 server we faced issue with Existing Deployment option. we couldn't complete the upgradation. we followed below steps to fix the issue:
**1. Restored the VM/QA TFS server with VM snapshot backup created before upgradation.
Run below command to remove the deleted collection from TFS Config DB.
"TFSConfig Collection /delete /collectionName:[COLLECTION NAME]"
Stop TFS services and done upgradation to Azure DevOps Server 2019 successfully.**

Related

How to delete a Team Project Collection in TFS 2017

I have a Team Project Collection in TFS 2017 that is unused. It was created back, when TFS was new in our Company as a test. So there has never been real Code Checked in or anything. So I want to just delete. I couldn’t find out, how this works.
To delete a collection:
Detach the collection,
Delete the collection database
Delete the SharePoint site collection that supported the deleted
collection.
Please see Detach or delete a team project collection for details, it's also applied to TFS 2017.
This is a high-level administrative task that can only be performed by logging into the Application Tier server and using the TFS administration tool.

Moving a Team Project from one Collection to another - TFS 2015 Update 3

I'm trying to move a Team Project from one Team Collection to another, including check-in history, user stories and source code.
I'm running a TFS 2015 Update 3 setup, but the tools I found do not support this version.
Tools:
http://tfsintegration.codeplex.com/
https://visualstudiogallery.msdn.microsoft.com/eb77e739-c98c-4e36-9ead-fa115b27fefe
0. Create an empty collection that will be used as a copy of DefaultCollection.
I called my second collection "TeamPrjectCollection"
1. Make a Full Backup in TFS Administration Console
2. Detach the collection that contains your Team Project
3. Back up the collection database only using SQL Management Studio.
4. Restore database from backup to your empty collection
Restore DefaultCollection from backup file into the empty Collection called "TeamPrjectCollection". You might get an error message during restore, make sure to open Options tab and check "Overwrite the existing database" and "Close existing connections to destination database".
If you still get access error try do get DB offline restart the server and then back online the DB.
5. Attach both collections in TFS Administration Console
Select Tfs_DefaultDatabase DBs from the list and attach it, then select Tfs_TeamProjectCollection and attach it too with different Collection Name. Ignore the warning at the end.
6. Sort your Team Projects in both collections
After your attach process second collection will go offline due to the warning message saying that your both team projects exist in both collections.
Simply remove MyFirstProject from 'TeamProject Collection'
and remove 'TeamProjectToMigrate' from 'DefaultCollection'
Bring 'TeamProjectCollection' online.
As can see both Collections are accessible from TFS
For more details please refer to Visual Studio documentation here: https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/move-project-collection
As #Daniel mentioned in comment, there's no way to move team projects between collections other than by using third party tools. But this feature is under planned, you can track this UserVoice:
We are committed to allow you to move team projects between
collections, although it’s currently not in scope for the 2016
calendar year. We’ll provide an updated timeline as we get closer to
2017.

TFS in Visual Studio Online

I used before free TFS from Visual Studio Online. I worked fine, I added some projects to TFS and did check-in and check-out without problem. But now it just stop working. When I try to check-in new projects, I get the following error:
The following issues were encountered during check in: TF10169:
Unsupported pending change attempted on team project folder $/Code.
Use the Project Creation Wizard in Team Explorer to create a project
or the Team Project deletion tool to delete one.
What is Project Creation Wizard? How I can run it? And what is happened with my account? I see the message:
Your account is an Early Adopter account. In 31 days your account will
revert to a standard account.
Maybe that's why it's not working anymore?
You cannot create or delete folders at the top-level of the source tree. (Eg, $/Code).
The top level of the source tree is reserved for Team Projects, which must be created and deleting specially. If you want to delete $/Code, you will need to undo your pending change that deletes it and instead delete it using the Project Creation Wizard or the TfsDeleteProject command.

Change UserName for a TFS Workspace

We recently changed domains for our entire network, and I am trying to find a way to migrate my TFS workspace from my old Domain\Username to the new Domain\Username without losing any pending changes.
Note also that I need a solution to accomplish this via the command line, as Visual Studio won't let me access the old workspace from the old domain.
See the MSDN article about the Workspaces Command. You can invoke tf workspace with an argument /updateUserName. That should do the trick.
I just migrated my TFS server from my old domain to a new domain because my organization had a company name change. After the migration, I had to overcome several issues and eventually I was left with the development team getting TFS14045 error messages. The fix to this problem was simply having the developers issue the following command from their Visual Studio command prompt.
tf workspaces /updateUserName:OLDDOMAIN\olddomainusername /s:http://[tfsserver]:8080/tfs
I found that if multiple developers had logged into that workstation and created workspaces with visual studio that I had to issue this command for each domain account until I get them all. After I did this procedure I was then able to remove their corresponding records form the tbl_identity table of the TFS_Configuration database on my TFS server so that I wouldn't then also have to look at duplicate accounts for the same person (one for their old domain account and one for their new domain account) inside my TFS collection. Leaving this record in place also created another error that you will get if a developer breaks the build and TFS tries to create a auto generated work item for that developer to fix the build. If both the old domain account and the new domain account is present in the TFS collection (recorded in the tbl_identity table...) then TFS will not know which user account to use when making the work item for the broken build.
Good luck and I apologize if this is too rambling to read but I am in a hurry and I hate reading posts that leave out detail ;-)

Restore all security groups of the TFS 2010 collections after applying the TFSConfig repair command

We've lost our TFS and domain servers. TFS was configured to use domain accounts. We could resotre only the TFS Project Collection databases and thanks to the "TFSConfig repair" command, we finally attached them to a new TFS instance.
But all of the default security groups for repaired projects are lost (except the administrators). For example we don't have "Contributors" group anymore.
Now we want to restore these standard groups. Maybe it's possible to fix it by applying the default TFS "project proccess templates" on all existing projects and collections again.
Is there any way to address it?
As you lost the Domain server you have to follow the Move User and Service Accounts chapter of the "Move Team Foundation Server from One Environment to Another" procedure.
By the way, there's no such feature as reapplying a process template on an existing Team Project.
Have you tried to recreate at least one group that you lost? Only to know if that is working (maybe TFS will return an error because the group still exists in the database but it's not shown for whatever reason) ?
One last thing: check the TFS Scheduler Windows Service is running on the TFS Server and look for errors in the Windows Event Log.

Resources