-
Notifications
You must be signed in to change notification settings - Fork 447
Could not find a workspace with mappings #174
Comments
Hi Øyvind, thanks for trying out the extension! Based on the error message from the Also, I'm a little bit confused by the value you set for But, for my information, are you attempting to connect to a TFVC repository on Visual Studio Team Services (e.g., account.visualstudio.com) or a local on-premises server (e.g, http://my-tfvc-server:8080/tfs)? |
Hi again, That was a quick reply :-) I am indeed trying to connect to TFVC repository on Visual Studio Team Services. I created the project at yetzweb.visualstudio.com. Then i downloaded the "MyFirstProject" as a zip from the webpage. Unzipped it in my download-folder on my mac (this is just for testing-purposes. Once this works, i will do the proper setup). I then open the folder with Visual Studio Code (MyFirstProject). Next i open up terminal, and add the command: After login, the pop-up disappears. There is no more info in the terminal window if the login is successful or not. As i expect that the login is successful, i then head over to Visual Studio Code again - running CMD + P and attempt the "Team signin". This is when i get the error-message:
Sorry - i am really a noob at this, but how do i create a TFVC local workspace? (i have just downloaded the .zip-file of the project as mentioned above. Thanks for any help :-) Regards |
Then i downloaded the "MyFirstProject" as a zip from the webpage. Since you're working on a Mac with Team Foundation Version Control, I'm wondering if you're using one of the JetBrains IDEs (like Android Studio or IntelliJ)? Or are you really just starting out with TFVC (and is that what you mean by "i am really a noob at this")? 😄 If you haven't used TFVC before, you might want to check out our documentation starting with https://www.visualstudio.com/en-us/docs/tfvc/overview. Admittedly, there's a TON of information there. For now, I'll assume that you've got a TFVC repository up on Team Services that you need to contribute to and you don't have any other IDE to use in order to create your local workspace (also known as 'the hard way to create a TFVC workspace' 😄). Before you begin (and so you don't get prompted on each command you run), you'll want to set TF_AUTO_SAVE_CREDENTIALS=1 (case-sensitive). Likely do this in your profile so you don't lose the setting. Then, go ahead and run:
That should prompt for credentials and then return some information (probably with a message about there not being any workspaces found). Next, you need to create a local workspace on your machine. Change 'myWorkspaceName' to a value of your choosing.
When successful, this command will return a message similar to 'Workspace 'myWorkspaceName' created.'. Now that you have a workspace, you need to map folders into it (making that workspace aware of what source files you have 'enlisted'). I'm going to assume that your TFVC repository is named 'MyFirstProject'. At this point, you want to be running in a directory where you want your source code to go. Now map your folders with this command:
When successful, this command won't return any information. Finally, you need to get the source code from the remote server:
This will pull down all of the code in that project. At this point, you should be able to open that folder (that contains your source) in Visual Studio Code. When you do, you'll likely be prompted by the extension for credentials. Since you're using VSTS, you'll need to create a PAT; see this video. Once you provide the PAT to the extension, everything will initialize and the TFVC Viewlet should be ready to use. Give all of that a shot and let's see how far we get. 😄 |
Hi again, thanks for a lot of useful information :-) I am a noob using TFVC (first time) - used GitHub prior to this - and thats plug&play. But for our next project we are using TFVC. So needed to get this to work. And... thanks to you - it now works! I used a combination of your description, Eclipse and the Team Explorer extention. By using Eclipse and Team Explorer i created the local workspace - using this tutorial: http://java.visualstudio.com/Docs/tools/eclipse Turns out that the settings in Visual Studio Code needed to be commented out as you mentioned in your first reply. It actually prevented Visual Studio Code to connect to TFVC as long as it was present in the settings:
At the exact moment of commenting out the line in settings, i was prompted with the "message" that is part of your youtube tutorial: https://www.youtube.com/watch?v=t6gGfj8WOgg&feature=youtu.be So just followed the steps in the youtube-tutorial, and now it works as it should. Now i will just have to replicate the process for the actual project. But now i know how to do it... hopefully! ;-) Thank you so much for all the help - you saved me hours of frustration :-) Regards |
Fantastic! I'm glad you got it all figured out Øyvind. Good luck and if you've ever got any feedback, let us know. |
Hi there,
thanks for an awesome update - this will be great once i get it to work :-)
I have now been struggling for several hours, but have not found a solution yet. I´m a noob at this, so there is always a possibility that i have done something wrong.
I have read the tutorial, and watched the instruction video (Linux) - but i still get the error-message. Can you take a look at the log-file further down, and see if there is something obvious that i am doing wrong here?
Settings in VS Code:
"tfvc.location": "/Users/oyvindbergesen/Dropbox/Repos/tfs-command/tf",
"tfvc.proxy": "https://yetzweb.visualstudio.com:8080/MyFirstProject",
Some more info:
Logfile from VS Code:
`2017-04-13T16:14:32.659Z - info: [0976] *** FOLDER: /Users/oyvindbergesen/Downloads/MyFirstProject ***
2017-04-13T16:14:32.661Z - debug: [0976] Looking for an External Context at /Users/oyvindbergesen/Downloads/MyFirstProject
2017-04-13T16:14:32.661Z - debug: [0976] No External Context at /Users/oyvindbergesen/Downloads/MyFirstProject
2017-04-13T16:14:32.664Z - debug: [0976] Looking for TFVC repository at /Users/oyvindbergesen/Downloads/MyFirstProject
2017-04-13T16:14:32.665Z - debug: [0976] TFVC Creating Tfvc object with localPath='undefined'
2017-04-13T16:14:32.665Z - debug: [0976] Using TFS proxy: https://yetzweb.visualstudio.com:8080/MyFirstProject
2017-04-13T16:14:32.665Z - debug: [0976] TFVC Retrieved from settings; localPath='/Users/oyvindbergesen/Dropbox/Repos/tfs-command/tf'
2017-04-13T16:14:32.667Z - debug: [0976] TFVC Repository created with repositoryRootFolder='/Users/oyvindbergesen/Downloads/MyFirstProject'
2017-04-13T16:14:32.667Z - debug: [0976] TFVC Repository.CheckVersion
2017-04-13T16:14:32.669Z - debug: [0976] TFVC: tf add -noprompt -? -proxy:https://yetzweb.visualstudio.com:8080/MyFirstProject
2017-04-13T16:14:32.675Z - debug: [0976] TFVC: spawned new process (duration: 4ms)
2017-04-13T16:14:32.687Z - debug: [0976] TFVC: spawned new process (duration: 12ms)
2017-04-13T16:14:34.550Z - debug: [0976] TFVC: add exit code: 0 (duration: 1881ms)
2017-04-13T16:14:34.553Z - debug: [0976] TFVC Repository.FindWorkspace with localPath='/Users/oyvindbergesen/Downloads/MyFirstProject'
2017-04-13T16:14:34.554Z - debug: [0976] TFVC: tf workfold -noprompt ******** -proxy:https://yetzweb.visualstudio.com:8080/MyFirstProject
2017-04-13T16:14:34.558Z - debug: [0976] TFVC: spawned new process (duration: 3ms)
2017-04-13T16:14:34.738Z - debug: [0976] TFVC: workfold exit code: 100 (duration: 184ms)
2017-04-13T16:14:34.740Z - debug: [0976] TFVC errors: An argument error occurred: The workspace could not be determined from any argument paths or the current working directory.
2017-04-13T16:14:34.741Z - error: [0976] Could not find a workspace with mappings. Perhaps the wrong version of TF is being used with the selected folder?`
Regards
Øyvind
The text was updated successfully, but these errors were encountered: