Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Team: Signin Issue #162

Closed
mpavone opened this issue Apr 1, 2017 · 8 comments
Closed

Team: Signin Issue #162

mpavone opened this issue Apr 1, 2017 · 8 comments

Comments

@mpavone
Copy link

mpavone commented Apr 1, 2017

I'm experiencing problem logging on Visual Situdio Team Services.
I have installed Visual Studio 2017 and Visual Studio Code 11.10.2.

The error message:
(team) No Team Services or Team Foundation Server repository configuration was found. Ensure you've opened a folder that contains a repository.

Below the log:

2017-04-01T21:12:37.143Z - debug: [14828] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe'
2017-04-01T21:12:37.143Z - debug: [14828] TFVC Repository created with repositoryRootFolder='d:\Lab\DBot'
2017-04-01T21:12:37.143Z - debug: [14828] TFVC Repository.FindWorkspace with localPath='d:\Lab\DBot'
2017-04-01T21:12:37.143Z - debug: [14828] TFVC: tf workfold -noprompt ********
2017-04-01T21:12:37.143Z - debug: [14828] TFVC: spawned new process (duration: 0ms)
2017-04-01T21:12:37.159Z - debug: [14828] TFVC: spawned new process (duration: 16ms)
2017-04-01T21:12:37.513Z - debug: [14828] TFVC: workfold exit code: 0 (duration: 370ms)
2017-04-01T21:12:37.513Z - error: [14828] Could not find a workspace with mappings. Perhaps the wrong version of TF is being used with the selected folder?

@jeffyoung
Copy link
Contributor

Hi @mpavone. Thanks for trying out the extension!

I assume you mean VS Code 1.10.2? The TFVC support in the extension will require VS Code 1.11.0 (and higher) once that is released as we depend on APIs from that version of VS Code. The development of our TFVC support is actually in the Insiders build (which is currently the 1.11.0 build).

That said, can you provide me a bit more details on your scenario (what is it you're attempting)? Did you update your VS Code settings to point at your tf.exe? If so, we can see if we can determine what's going on but we haven't released the support officially yet. So if we do get past this particular issue (depending on what it is), the TFVC support won't be fully enabled.

Finally, I'd interested in the output of the workfold command when it was run from 'd:\Lab\DBot'. If you could run that version of tf.exe from that folder, I'm curious to see the results. I suspect there may not be any team project in the mappings.

@mpavone
Copy link
Author

mpavone commented Apr 3, 2017

I'm going to provide you more details.

I assume you mean VS Code 1.10.2?
Yes, it's correct
Did you update your VS Code settings to point at your tf.exe?
Yes, I have configure the "tfvc.location"
As you can read from the log, VSCode is able to find it
2017-04-01T21:12:37.143Z - debug: [14828] TFVC Retrieved from settings; localPath='C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe'

It is the version bundled in Visual Studio 2017
This is the exact version:
Microsoft (R) TF - Team Foundation Version Control Tool, Version 15.112.26313.0

If I run the command "tf vc workfold" I obtain the same result:
D:\Lab\DBot>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe vc workfold

Workspace : PC-PAVONEMA (Martino Pavone)
Collection: https://mpavone.visualstudio.com/
This workspace has no working folder mappings.

I want to point out that the project in Visual Situdio Team Services uses the GIT version control and not Team Foundation version control.

@jeffyoung
Copy link
Contributor

So if you're working with a Git repository, you don't need to set tfvc.location. In fact, I don't expect much to work in the released version of VS Code even if you set tfvc.location (as all of the functionality/APIs haven't been released). That said, I'd be interested in how you knew to set tfvc.location?

You did say in the issue title that you're having an issue with signing in? Is it simply this particular error? If so, remove the tfvc.location entry and re-open that folder. Assuming that folder contains a Git repository cloned from Team Services, the extension should function normally (and by normally, it you haven't provided a personal access token (PAT) for your account, you'll be prompted to create one and then provide it).

@mpavone
Copy link
Author

mpavone commented Apr 4, 2017

I have removed the tfvc.location configuration, and then exited from VSCode.
Opened again VSCode and I typed in the command palette:

team: Signin
The error message is:
"(team) No Team Services or Team Foundation Server repository configuration was found. Ensure you've opened a folder that contains a repository."

Then I closed and opened VSCode again, I have the following log in team-extension.log

2017-04-04T11:47:38.106Z - info: [18724] *** FOLDER: d:\Lab\DBot ***
2017-04-04T11:47:38.108Z - debug: [18724] Looking for an External Context at d:\Lab\DBot
2017-04-04T11:47:38.108Z - debug: [18724] No External Context at d:\Lab\DBot
2017-04-04T11:47:38.112Z - debug: [18724] Looking for TFVC repository at d:\Lab\DBot
2017-04-04T11:47:38.113Z - debug: [18724] TFVC Creating Tfvc object with localPath='undefined'
2017-04-04T11:47:38.113Z - debug: [18724] Using TFS proxy:
2017-04-04T11:47:38.113Z - debug: [18724] TFVC Retrieved from settings; localPath=''
2017-04-04T11:47:38.113Z - warn: [18724] TFVC Couldn't find where the TF command lives on disk.
2017-04-04T11:47:38.115Z - error: [18724] The path to the TFVC command line was not found in the user settings. Please set this value (tfvc.location) and try again.

@jeffyoung
Copy link
Contributor

It appears the extension isn't detecting that the folder at d:\Lab\DBot is a Team Services (or TFS) Git repository. Is it?

(The way the extension works is that you need to open a folder from within VS Code that contains a Team Services Git repository. Once you do, it will prompt you for credentials (the PAT) and then connect to the account. You don't actually sign in first then open a folder. We use information about the Git repository (its remote) to determine if it's a Team Services Git repository and whether we need credentials.)

After releasing 1.115.0, I pushed the initialization of any TFVC-related functionality after the request for credentials. So in this scenario, once 1.116.0 is released, there shouldn't be any TFVC initialization information in your logs until after you sign in.

@mpavone
Copy link
Author

mpavone commented Apr 4, 2017

I have just created the folder.
I need to connect to Team Services and then it should initialize the folder; otherwise, VSCode should initialize the folder before the connection.
Let me know if there is a way to initialize a Team Services Git folder without connecting to Team Services.

@jeffyoung
Copy link
Contributor

In order to 'initialize' the folder as a Team Services Git folder (repository), you'd need to run 'git init' and then push that repository to a remote. Once the remote is updated, the extension will detect that it is now within a folder that contains a Team Services repository and will activate. (You can read more on how to do this at #27).

At this time, there isn't a way to push a newly initialized Git repository to Team Services without having an empty repository on Team Services first.

Hopefully I've understood what you're attempting to do.

@mpavone
Copy link
Author

mpavone commented Apr 5, 2017

Solved!
Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants