0

I am adding TFS to Visual Studio Code IDE(1.42.0) for that I have installed Azure Repos extension.

In VS code at File-->Preference-->Setting-->Tfvc:Location, when I am entering path C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe.

Getting error

(team) Unable to find the TF executable. Please ensure TF is installed and the path specified contains the filename.

How can I solve this issue?

Edit 1: After installing Azure Repos extension, I am entering above path in tfvc:Location(for both tabs User and Workspace), but after entering path nothing happens. Check below screenshot

enter image description here

Edit2: Now I am getting this error at right below in VS code IDE

enter image description here

R15
  • 13,982
  • 14
  • 97
  • 173

3 Answers3

1

Since you have not got any help yet. I will take a shot. Any chance there is a issue with finding the executable and casing for the extension? My local TF is capitilized. \TF.exe

Also might want to checkout the Github and readme for TFVC.

Eric Smith
  • 2,340
  • 12
  • 16
1

Make sure you have installed VS on your computer. With a typical installation of Visual Studio, the Windows version of the TFVC command line client (tf.exe) is available under the Program Files (x86) folder. It will typically be placed in a location similar to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TF.exe. On the 2017 version of Visual Studio Community, it can be found in a location similar to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe.

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • In setting (tfvc:Location) when I am entering ts.exe file path nothing happening. I have VS Enterprise and latest VS code. – R15 Feb 10 '20 at 07:46
  • Do you use VS 2017 Enterprise? Have you checked `C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer`? – Cece Dong - MSFT Feb 10 '20 at 07:58
  • Yeah I have VS Enterprize 2017. This is my path I am using `C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe` – R15 Feb 10 '20 at 08:05
  • Have you checked the path? Is the TF.exe there? – Cece Dong - MSFT Feb 10 '20 at 08:30
  • Yes. TF.exe file is there. – R15 Feb 10 '20 at 08:31
  • Please double check whether you have added the correct entry to the setting "tfvc.location": "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe". – Cece Dong - MSFT Feb 10 '20 at 08:52
  • Have you tried using double slash \\ sometimes vs code doesn't find windows path with just a single \ (ps it's a linux thing). or you can change all the \ for / (single) that works on both linux and windows. Also try the comment from below with TF.exe (capitalized). – Etienne Feb 10 '20 at 13:37
  • @ArvindChourasiya After entering path, it's expected nothing happens. You should be able to use TFVC function now. Do you still get any error? – Cece Dong - MSFT Feb 11 '20 at 06:25
  • @ArvindChourasiya Are you able to use the TFVC function now? – Cece Dong - MSFT Feb 15 '20 at 06:59
  • @CeceDong-MSFT - Now I am starting adding tfs to VS Code. is `Azure Repos` extension fine? – R15 Mar 12 '20 at 07:46
  • Yes. I've tested it when you posted this case and it's working. – Cece Dong - MSFT Mar 12 '20 at 09:28
  • @CeceDong-MSFT - After adding path followed by file name I am getting error. Please check my updated question screenshot. – R15 Mar 13 '20 at 09:16
  • @CeceDong-MSFT - Could you please check my updated question. – R15 Mar 13 '20 at 11:38
  • Did you get the error after input the Location? Did you change your workspace from Server to Local? Can you try to disable the extension and enable again? – Cece Dong - MSFT Mar 16 '20 at 02:14
  • Yes I got error, please check Edit2 in my question. Now I am getting error `(team) It appears you are using a Server workspace. Currently, TFVC support is limited to Local workspaces.` How to change workspace from server to local? – R15 Mar 16 '20 at 06:15
  • Check here: https://github.com/Microsoft/azure-repos-vscode/blob/master/TFVC_README.md#what-is-the-difference-between-a-local-and-server-workspace-how-can-i-tell-which-one-im-working-with – Cece Dong - MSFT Mar 16 '20 at 07:25
  • @CeceDong-MSFT - I have changed workspace to local. tfs getting connected for few seconds(at bottom left) when I open VSC and suddenly showing error(at bottom right) `(team) It appears you are using a Server workspace. Currently, TFVC support is limited to Local workspaces.` – R15 Mar 16 '20 at 08:01
  • Try to create a new local workspace, and reinstall the extension. – Cece Dong - MSFT Mar 16 '20 at 08:05
  • @CeceDong-MSFT - I have created new work space also but no changs..Just getting conected(after teams login) and disconnected – R15 Mar 19 '20 at 10:07
  • Did you reinstall the extension? You would also need to disable and enable the extension. – Cece Dong - MSFT Mar 20 '20 at 08:53
0

I found a .vscode folder in my project delete it, close and reopen vscode solved the problem