I\'m using TFS Preview (Team Foundation Service) with one of my projects with Visual Studio 2012. I\'m also using an on-premises TFS server with most of my projects. When I
I had to "run as a different user" to get Visual Studio to connect using my TFS account. It seemed to be trying to use my Microsoft account instead.
Text and image from: https://www.visualstudio.com/en-us/docs/connect/connect-team-projects
To change accounts
To run Visual Studio under an account that is different from your logged on Windows account, open the context menu for devenv.exe to access your run as options.
You can locate the executable in the following folder: Drive:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE.
I finally found the right answer for me on the web.
For me it happened after I changed my password and Windows cached the TFS password. It is require to be updated manually. This is one way to do it:
Solution found at: developercommunity.visualstudio.com
CREDIT: Lavente Nagy! Thanks so much!
Fix Summary:
I found a solution, and it works on Windows 7/Windows 10 too. The steps are the same:
Close Visual Studio. Go to Control Panel (with small icon view) → User Accounts → Manage your credentials (on the left column) → Select "Windows Credentials" → Scroll down to the "Generic Credentials" section and look for your TFS server connection. Expand the pull down and click "Edit". Enter in new network password. Reopen Visual Studio and everything should work again.
I was also facing the same issue as you did. Here is what I did to solve:
This is what I tried, and I did not need to logout from any sessions from TFS or VS Account.
Hope this helps.
Disconnect from Team Fountation Server under Team Menu and reconnect it from Connect Tab under Team Explorer Window
Now I got the solution to the problem which I have faced: The TFS remembered the prior password when I got logged in by using my mobile VPN.
Solution:
Resetting the account that I used to connect using VPN
Just restarting the visual Studio would do the job. As I did this and it worked like a charm