We are trying to integrate Visual Studio Code with Microsoft Visual Studio Team Foundation Server. Our Visual Studio Code version is 1.87.0
We installed TFS extension as suggested here
Then we setup the TF path
Then we tried Alt+T -> Add files and folders to version control. At that time we faced following issue
We tried tf workspace and gor error as below Screen shot from VSCode
We added env variable also Screen shot Env variable
how do we need to fix this?


Updated
Since you have installed VS, you may consider to Develop and share code in TFVC with Visual Studio instead of VSCode.
As for the error that
tf command is not recognizedin normal PowerShell prompt, we can add the path totf.exeinto thePathenvironment variable.We can then open a new PowerShell session or reopen VSCode -> Test to run
tf workspacescommand in the terminal session and see iftfcommand can work.Before using the
TFSVSCode extension, you need to create a local workspace mapping with the remote TFVC repo in Azure DevOps Server.For this, you can run
tf workspace /newcommands in Developer PowerShell of Visual Studio. See Workspace command (Team Foundation Version Control) for more details.Then you may open your local workspace folder in VSCode -> Press
Alt+T-> Select a file toCheck Out for Edit;What worth mentioning is that this extension doesn't seem to enable
check-infunction in the shortcut menu. See this open issue no check-in · Issue #7 · generalov/vscode-tfs · GitHub. You may reach out to the extension author/maintainer for confirmation.The workaround is to run
tf checkincommand. I expose the path oftf.exeinto environment variablesPATHto runtfcommands directly in VSCodeTerminalsessionPlease be advised to BACKUP your current pending changes before testing the workflow.