The first step:
On the command line, enter
C:\Program Files (x86) \microsoft Visual Studio 12.0\common7\ide
Step Two:
According to the user find the user under Workspace (workspace):
Input: TF workspaces/owner:[Account] /server:http://[serverdomainl]:[Port]/tfs/[ Project collection name ]/
Example: TF workspaces/owner:xiachuangfu/server:http://192.168.2.181:8080/tfs/creatunion2016/
When you are finished, the list of workspaces in this consumer project is returned.
Step Three:
Querying the status of changes
When you know the name of the workspace, you can further query the change status of the user.
Input: TF status/server: [Serverdomain]:[Port]/tfs/[ Project collection name ]//workspace: */user:[Account]
For example: TF status/server:http://192.168.2.181:8080/tfs/creatunion2016//workspace:*/user:xiachuangfu
The change status record is returned when it is completed.
Fourth step: or forced embedding or forced revocation, depending on the project situation
A) forced check-in, the operation is as follows:
From the second step, you can see that app. config has been checked out and edited to force the program to revert to the original change.
Input: TF undo/workspace:[ workspace name ]; [Account] [TFS Project path + file name ]/server:[Serverdomain]:[ Port]/tfs/[ Project collection name ]/
For example: TF undo/workspace:hank-pc_2;xiachuangfu $/Hechuan MCH Project/Analog his server side/his/app.config/server:http://192.168.2.181:8080/tfs /creatunion2016/
If there is no hint that the work area is incorrect or there is no change in the workspace, if prompted: the Operation Complated successfully. The forced embedding succeeds and the VS edit code.
B) Revoke his check-out (mandatory) and operate as follows:
Input: tf undo/workspace:mjbook (workspace name); MJ (user name) $/xxx/xxxxx/aaa.csproj (the path where the file is located)/server:http://192.168.2.181:8080/tfs/ [ Project collection name ]/
For example: TF undo/workspace:hank-pc_2;xiachuangfu $/Hechuan MCH Project/Analog his server side/his/app.config/server:http://192.168.2.181:8080/tfs /creatunion2016/
If no hint: it indicates that the directory is not modified;
Sometimes it is suggested that the workspace does not exist and that undo fails;
Fifth step: Depending on the project situation, whether you need to delete the workspace!
If the person leaves the office, the workspace can be deleted
Input: tf workspace/delete workspace:hank-pc (workspace name); Xiachuangfu (username)/server:http://192.168.2.181:8080/tfs/[ Project collection name ]/
For example: TF workspace/delete hank-pc_2;xiachuangfu/serverhttp://192.168.2.181:8080/tfs/creatunion2016/
Then refresh your Team Explorer to see if the locked file is missing.
VS2012 TFS resolves post-separation code legacy issues