2
votes

i trying to connect to TFS in VS code. i was install the Extension - "Visual Studio Team Services Extension for Visual Studio Code". i turn the workspace to "local" and sign in Successfully. and i add the root for the path in the "user settings" like this:

{
"tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\tf.exe",
"tfvc.restrictWorkspace": true,
"window.zoomLevel": 2,   

}

but now when i try to run a command, like:

Team: Associate work item

i geting the error:

Unable to validate the collection assuming 'DefaultCollection'

any idea what the problem? mayby i miss any step? thanks!

1

1 Answers

0
votes

Tested on my side, everything works as expected. Firstly make sure you have correctly set the TFVC support.

Based on the error message, seems it's related to the workspace. Make sure you have correctly mapped the workspace. Just try to remap the existing workspace or create a new workspace and map sources to a new local folder, then check that again.

If that still not work and you are sure that no any issues with the workspace, then just try to specify the collection and team project name in the user settings like this:

{
    "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\tf.exe",
    "team.remoteUrl": "http://server:8080/tfs/collection",
    "team.teamProject": "TeamProjectName",
    "tfvc.restrictWorkspace": true,
    "window.zoomLevel": 2 
}