You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Team Foundation Version Control support is currently in preview and some functionality is not yet fully working. We'd love feedback from you on any issues at [Developer Community](https://developercommunity.visualstudio.com/spaces/41/index.html). More changes are still to come!
15
+
> For the best version control experience on macOS, we recommend using Git instead of Team Foundation Version Control (TFVC).
16
+
Git is supported in Visual Studio for Mac and is the default option for repositories hosted in Team Foundation Server (TFS)/Azure DevOps. To learn more about using Git with TFS/Azure DevOps, see the [Setting up a Git Repository](./set-up-git-repository) article.
16
17
17
-
Azure Repos provides two models of version control: Git, which is distributed version control, and Team Foundation Version Control (TFVC), which is centralized version control. This article provides an overview and a starting point for using TFVC with Visual Studio for Mac.
18
+
Azure Repos provides two models of version control: Git, which is distributed version control, and Team Foundation Version Control (TFVC), which is centralized version control.
19
+
20
+
Visual Studio for Mac provides full support for Git repositories, but requires some workarounds to work with TFVC. If you're using TFVC for version control today, here are some solutions you can use to access your source code hosted in TFVC.
21
+
22
+
*[Use Visual Studio Code and the Azure Repos extension, for a graphical UI](#use-visual-studio-code-and-the-azure-repos-extension)
23
+
*[Connect to your repo using the Team Explorer Everywhere Command Line Client (TEE-CLC)](#connecting-using-the-team-explorer-everywhere-command-line-client)
24
+
*[Connect to TFVC using the (unsupported) Team Foundation Version Control extension for Visual Studio for Mac](#connect-to-tfvc-using-the-team-foundation-version-control-extension)
25
+
26
+
The rest of this article walks you through the options listed above.
18
27
19
28
## Requirements
20
29
21
-
* Visual Studio Community, Professional, or Enterprise for Mac version 7.5 or later.
22
-
* Azure DevOps Services, or Team Foundation Server 2013 and later.
23
-
* A project in Azure DevOps Services or Team Foundation Server, configured to use Team Foundation Version Control.
30
+
* Visual Studio Community, Professional, or Enterprise for Mac version 7.8 or later.
31
+
* Azure DevOps Services, Team Foundation Server 2013 and later, or Azure DevOps Server 2018 and later.
32
+
* A project in Azure DevOps Services or Team Foundation Server/Azure DevOps Server, configured to use Team Foundation Version Control.
33
+
34
+
## Use Visual Studio Code and the Azure Repos extension
35
+
36
+
If you like to work with a graphical interface for managing you local version control, then the Azure Repos extension for Visual Studio Code provides a supported solution from Microsoft. To get started, download [Visual Studio Code](https://code.visualstudio.com) and then learn how to [configure the Azure Repos extension](https://marketplace.visualstudio.com/items?itemName=ms-vsts.team).
37
+
38
+
## Connecting using the Team Explorer Everywhere Command Line Client
39
+
40
+
If you're comfortable using the macOS Terminal, then the Team Explorer Everywhere Command Line Client (TEE-CLC) provides a supported way to connect to your source in TFVC.
41
+
42
+
Special thanks to Chris Pilcher, a developer in our community, who's [original instructions for the TEE-CLC](https://gist.github.com/chris-pilcher/a3f14eb081d7ab983e5c) formed the basis of this section.
43
+
44
+
### Setting up the TEE-CLC
45
+
46
+
There are two ways to get setup with the TEE-CLC.
47
+
48
+
1. Use Homebrew to install the client.
49
+
1. Download and manually install the client.
50
+
51
+
The easiest solution is **using HomeBrew**, which is a package manager for macOS. To install using this method:
52
+
53
+
1. Launch the macOS Terminal application.
54
+
1. Install Homebrew using the Terminal and the instructions on the [Homebrew home page](https://brew.sh/).
55
+
1. Once Homebrew is installed, run the following command from your Terminal: `brew install tee-clc`
56
+
57
+
To **setup the TEE-CLC manually**:
58
+
59
+
1.[Download the latest version of the tee-clc](https://github.com/Microsoft/team-explorer-everywhere/releases) from the releases page of the Team Explorer Everywhere GitHub repo (e.g. tee-clc-14.134.0.zip at the time of this writing).
60
+
1. Extract the content of the .zip to a folder on disk.
61
+
1. Open the macOS Terminal app and use the `cd` command to switch to the folder you used in the previous step.
62
+
1. From within the folder, run the command `./tf` to test that the command line client can run, you may be prompted to install Java or other dependencies.
63
+
64
+
Once the TEE-CLC is installed, you can run the command `tf eula` to view and accept the license agreement for the client.
24
65
25
-
## Installation
66
+
Finally, to authenticate with your TFS/Azure DevOps environment, you'll need to create a personal access token on the server. Learn more about [authenticating with personal access tokens](https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/pats?view=azure-devops).
26
67
27
-
In Visual Studio for Mac, choose **Visual Studio > Extensions** from the menu. In the **Gallery** tab, select **Version Control > Team Foundation Version Control for TFS and VSTS** and click **Install**:
68
+
### Using the TEE-CLC to connect to your repo
69
+
70
+
To connect to your source code, you first need to create a workspace using the `tf workspace` command. For example, the following commands connect to an Organization in Azure DevOps Services called "MyOrganization":
The `TF_AUTO_SAVE_CREDENTIALS` environment setting is used to save your credentials so you aren't prompted to enter them multiple times. When prompted for a user name, use the personal access token you created in the previous section and use a blank password.
78
+
79
+
Now, to create a mapping of your source files to a local folder, you'll use the `tf workfold` command. The following example will map a folder named "WebApp.Services" from the "MyRepository" TFVC project and set it up to be copied into the local ~/Projects/ folder (i.e. a "Projects" folder in the current users's home folder).
Finally, you use the following command to get the source files from the server and copy them locally:
86
+
87
+
```
88
+
tf get
89
+
```
90
+
91
+
### Committing changes using the TEE-CLC
92
+
93
+
After you've made changes to your files in Visual Studio for Mac, you can switch back to the Terminal to check in your edits. The `tf add` command is used to add files to the list of pending changes to be checked-in and the `tf checkin` command performs the actual check-in to the server. The `checkin` command includes parameters to add a comment or associate a related work item. In the following code snippet, all files in a `WebApp.Services` folder are added, recursively, to the checkin. Then, the code is checked in with a comment and associated with a work item with the ID "42".
94
+
95
+
```
96
+
cd WebApp.Services
97
+
tf add * /recursive
98
+
tf checkin -comment:"Replaced 'Northwand' typos with the correct word Northwind" -associate:42
99
+
```
100
+
101
+
To learn more about the commands mentioned here, or others, you can use the following command from the Terminal:
102
+
103
+
`tf help`
104
+
105
+
## Connect to TFVC using the Team Foundation Version Control extension
106
+
107
+
In the Visual Studio for Mac Extension gallery, there is a Team Foundation Version control extension that offers limited support to connect to TFVC. The extension is not supported and has several known issues, so your experience may vary when using it.
108
+
109
+
To install the extension, launch Visual Studio for Mac and choose the **Visual Studio > Extensions** menu. In the **Gallery** tab, select **Version Control > Team Foundation Version Control for TFS and Azure DevOps** and click **Install...**:
28
110
29
111

30
112
31
113
Follow the prompts to install the extension. Once it's installed, restart the IDE.
32
114
33
-
## Updating the extension
115
+
###Updating the extension
34
116
35
117
Updates to the TFVC extension are made periodically. To access updates, choose **Visual Studio > Extensions...** from the menu and select the **Updates** tab. Select the extension in the list and press the **Update** button:
Press **Install** on the next dialog to uninstall the old package and install the new one.
40
120
41
-
## Using the add-in
121
+
###Using the add-in
42
122
43
123
Once the extension is installed, select the **Version Control > TFS/Azure DevOps > Open from Remote Repository** menu item.
44
124
@@ -48,19 +128,19 @@ Choose either VSTS or Team Foundation Server to get started and press **Continue
48
128
49
129

50
130
51
-
### Azure Repos Authentication
131
+
####Azure Repos Authentication
52
132
53
133
When you select a project that is hosted on Azure Repos, you're prompted to enter your Microsoft account details:
54
134
55
135

56
136
57
-
### TFS Authentication
137
+
####TFS Authentication
58
138
59
139
To connect to TFS, enter the server details and your account credentials. Enter a domain to use NTLM authentication, otherwise leave blank to use basic authentication. Select **Add Server**:
60
140
61
141

62
142
63
-
## Selecting a project
143
+
###Selecting a project
64
144
65
145
Once you've successfully authenticated, you can see a list of repositories that are associated with the account in the **Open from Source Control** dialog:
66
146
@@ -73,7 +153,7 @@ This dialog is organized with the following nodes:
73
153
74
154
At this point, you can search and filter by the name of a project or organization.
75
155
76
-
### Adding a new server
156
+
####Adding a new server
77
157
78
158
To add a new server to the list, press the **Add Host** button on the **Open from Source Control** dialog:
79
159
@@ -83,7 +163,7 @@ Select the provider from the list, and enter your credentials:
83
163
84
164

85
165
86
-
## Creating a new workspace
166
+
###Creating a new workspace
87
167
88
168
To start working with a project, you need to have a _workspace_. If you don't already have a workspace, you can create one from the **Workspace** combobox in the **Open from Source Control** dialog:
89
169
@@ -93,7 +173,7 @@ Set the name and local path for your new workspace and select **Create Workspace
93
173
94
174

95
175
96
-
## Using the Source Code Explorer
176
+
###Using the Source Code Explorer
97
177
98
178
Once you've created a workspace and mapped your project, you can start working with the _Source Code Explorer_.
99
179
@@ -113,7 +193,7 @@ Many of these actions are available through context actions on the project:
113
193
114
194

115
195
116
-
## Managing workspaces
196
+
###Managing workspaces
117
197
118
198
If you haven't already created a workspace, as described in the [Creating a workspace](#creating-a-new-workspace) section, you'll notice that the Source Code Explorer is empty:
119
199
@@ -140,9 +220,9 @@ Once your workspace is set up, it can be changed or removed by clicking the **Ma
140
220
141
221

142
222
143
-
## Troubleshooting
223
+
###Troubleshooting
144
224
145
-
### Problems using basic authentication
225
+
####Problems using basic authentication
146
226
147
227
The following options can be used to authenticate with a server:
148
228
@@ -162,26 +242,26 @@ To use basic authentication it is necessary to enable **Alternative authenticati
To set up Team Foundation Version Control (TFVC) on your dev machine, you **must** create a workspace, as described in the [Managing workspaces](#managing-workspaces) section.
168
248
169
249
In Source Control Explorer, press the **Manage Workspaces** Button. Follow the steps to map the project to a folder on your dev machine.
170
250
171
-
### I do not see any / all of my projects
251
+
####I do not see any / all of my projects
172
252
173
253
After authenticating you should see the list of projects. By default, only TFS projects are shown. To see other types of projects, check the "See all projects" box.
174
254
175
255
Keep in mind that projects that are on the server will not appear if you don't have the correct privileges.
176
256
177
-
#### I am getting the error "Cannot create the workspace. Please, try again"
257
+
#####I am getting the error "Cannot create the workspace. Please, try again"
178
258
179
259
When trying to [create a new workspace](#creating-a-new-workspace), you should make sure the following conditions are met:
180
260
181
261
- No use of invalid characters in the workspace name.
182
262
- The name must be less than 64 characters.
183
263
- The local path cannot be used by any other workspaces.
184
264
185
-
## See also
265
+
###See also
186
266
187
267
-[Develop and share your code in TFVC using Visual Studio (on Windows)](/azure/devops/repos/tfvc/share-your-code-in-tfvc-vs)
0 commit comments