How to switch TFS user name in Visual Studio 2012


Today, in one of our several common Virtual Machines,  I wanted to access TFS which is in our VPN Company network. Previously some one else was working on that machine, so his credential for TFS is stored as a default user. So this is not a problem in Visual Studio 2010, because you can just switch user and connect to TFS. But for Visual Studio 2012 you have a two cases.

In case of VisualStudio.com service, there is an option to log out from current user name.

But if you want to connect to classic Team Foundation Server this is not a case.

In Visual Studio 2012 there is no action for that in the current window, as you can see on the picture below.

If you want to change user name, you need to find solution somewhere else not here.

In fact to change user name of previous connection, you have to delete cached connection or at least modify it which is stored in Windows Credential in Control Panel.

So open Control Panel->User Account and choose Manage your credentials

Within Windows Credential find connection to TFS and remove it, or edit it if you like.

Restart Visual Studio 2012, and try to connect to TFS, you should get the prompt for User name and password:

Advertisement

How to delete Visual studio project from tfspreview.com


Today I wanted to remove some of my experimental projects hosted in tfspreview.com. But I have never tried to delete project from Team Foundation Server at all. SO I started to search and found that you have to use Cisula Studio Command Prompt in ordr to delete project on TFS.

So here are steps how you can easily delete project form TSFPreview.com

Before you run the command you need to provide the following information similar I have listed here:

My tfs preview account is: https://bhrnjica.tfspreview.com

The project I want to delete is: CrossNumber

Database which contains my project is: DefaultCollection

These informationa are required to delete project, and also before you start deletion you must be logged to your tfspreview.com subscription.

1. Open Visual Studio Command Prompt

2. Type the following command: TFSDeleteProject /force /collection:https://bhrnjica.tfspreview.com/DefaultCollection CrossNumber

3. Confirm deletion by typing “Y

4. The result in Command prompt will be similar like on the picture:

5. Go to your project web site to be sure the project is terminated.

 

More information about Deleting Team Project you can find here.