问题
A few days ago I changed my primarly alias for my Microsoft Account. Now I want to checkin my code, and get some error messages:
An attempt to communicate with Visual Studio Team Services failed because a token could not be retrieved.
You are anot authorized to access [...]
Here is a picture of it:
As suggested, I already tried re-entering my credentials. But this has no effect. I already tried closing Visual Studio, restarted my PC, but nothing helps. How can I solve the problem?
回答1:
I solved the issue by deleting the following folder after I have closed Visual Studio:
%LOCALAPPDATA%\.IdentityService
Then I opened Visual Studio again, and clicked Manage Connections:
Finaly I have connected again to my Microsoft Account, restarted Visual Studio and was able to check in my code.
回答2:
I found that deleting the hidden .vs folder within the solutions directory resolved the problem.
来源:https://stackoverflow.com/questions/52261545/how-do-i-connect-to-my-teamproject-after-i-changed-my-primary-account-alias