# Managing Projects With TFS

> The supported versions of Team Foundation Server are:

The supported versions of Team Foundation Server are:

* 2012
* 2013
* 2015
* Express 2012
* Express 2013
* Express 2015
  :::note
  Studio only works with **Server** workspaces. You cannot open projects from TFS if the workspace created by Studio is changed to a **Local** workspace from outside of Studio.
  :::

## Setting up TFS in Studio

1. In the **Team** tab, click **Open from TFS** or **Add to TFS**. The **Connect to Azure DevOps Server** window is displayed.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-167141-5184eccb.webp)
2. Click **Servers**. The **Add/Remove Azure DevOps Server** window is displayed.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-170379-1a82c087.webp)
3. Click the **Add** button. The **Add Azure DevOps Server** window is displayed.
   :::note
   If Studio crashes or fails to respond when you try to add a TFS server, remove the configuration files from `C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft Visual Studio\15.0_xx\Team Explorer`, restart Studio, and try again.
   :::

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-172400-eacb3750.webp)
4. Fill in the details of your **TFS** repository and click **OK**. Your team’s collections and projects are available in the **Connect to Azure DevOps Server** window. The **Manage TFS Online** button connects you to the web management interface.

If the TFS server is online (e.g. `https://<account>.visualstudio.com`) UiPath Studio requests authentication with a Microsoft account.

:::note
By default, on all Windows Server machines, this window is not displayed, as it requires JavaScript to run. This can be enabled from the Internet Explorer settings (Security tab &gt; Custom Level &gt; Enable Scripting).
:::

## Opening a Project from TFS

1. In the **Team** tab, click **Open from TFS**. The **Connect to Azure DevOps Server** window is displayed.
   :::note
   The **Connect to Azure DevOps Server** window has the option to switch between users when connecting to the TFS repository.
   :::
2. Open the drop-down menu under the **Select an Azure DevOps Server** and pick the server you want to access. Pick a team project collection and a team project. Once the selection is made, click **Connect**. The **Repository Browser** opens.
3. In the repository browser, you can browse to and select an existing folder or copy the **Selected Path**.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-169137-d85bc8f2.webp)
4. Click **OK** to confirm the selection and close the window. The **Check out from TFS project** window is displayed. To change the file and open the repository browser, use the ![](https://dev-assets.cms.uipath.com/assets/images/studio/studio-image-button_repo_browser-59385c6a.png) button.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-169692-308b4313.webp)
5. Pick a **Check out directory**. The project name is added to the checkout directory by default. Click **Open**. The `project.json`, `.xaml` and other files stored in the repository project folder are mapped locally.
6. When you open a file from Studio, for example, `Main.xaml`, a **Question** dialog box opens with two options for pulling the file from the repository:
   * **Check out latest and edit** - opens the latest version of the `Main.xaml` file from the repository, in edit mode. The **Break Lock** option indicates that the file is already checkout by another user. By using this option, the lock is removed without notifying the user.
   * **Open local as read only** - opens the local version of the `Main.xaml` file in read-only mode. The **Package Manager** can be opened even if the files are in read-only mode, but in order to perform changes and install dependencies, the `project.json` file needs to be checked out. Selecting the checkbox for **Always checkout latest and edit and don't show me this again**, and then the **Check out latest and edit** option propagates your choice for future occurrences. Regardless of your choice, the `project.json` file still needs to be checked out separately for certain changes to take effect.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-170355-65fba6cf.webp)

     :::note
     If you check out only the `.xaml` file of a library project from the TFS repository, the `.screenshots` folder does not update. Use **Get Latest Version** on the folder to get the files.
     :::

## Adding a Project to TFS

1. Create or open a project in Studio. Click **Start** &gt; **Team** &gt; **Add to TFS** button, or **Add to Source Control** &gt; **Add to TFS** shortcut in the status bar. The **Connect to Azure DevOps Server** window is displayed.
2. Pick the server you want to access, a team project collection, and a team project. Once the selection is made, click **Connect**. The **Please select the folder to add under** window is displayed, which allows you to select the location to add your project to. You can browse to and select an existing folder, or click **Create Folder**![](https://dev-assets.cms.uipath.com/assets/images/studio/studio-image-add_resource-9eb04c18.png) above the left navigation pane to add a new folder. Click **OK** to confirm the selection and close the window.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-169137-d85bc8f2.webp)
3. The **Add to TFS project** window is displayed. To add the project to a particular folder, provide a relative path to the **Remote subfolder** box or use the ![](https://dev-assets.cms.uipath.com/assets/images/studio/studio-image-button_repo_browser-59385c6a.png) button to open the repository browser.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-167381-8b5c3c97.webp)
4. Click **Add**. The **Check in Changes** window opens.
5. Select the files you want to check in and write a **Commit Message**. Click **Check In**. The project files are added to the TFS repository, and checked out locally, except for the `project.json` file.

When a project is added to TFS, the context menu in the **Project** panel includes TFS-specific options. For more information, see [Context Menu Options for SVN and TFS](https://docs.uipath.com/studio/standalone/latest/user-guide/about-automation-projects#about-automation-projects).

## Editing and Checking in Changes to TFS

1. Connect one of your projects to your **TFS** repository.
2. Right-click the `.xaml` file and select **Check Out for Edit**. The latest version of the `.xaml` file is mapped locally and opened in the **Project** panel. It becomes locked for editing until it’s checked in. Perform any sort of changes to the files.
   :::note
   Once a file is checked out from the **TFS** repository, it is no longer available for check out by other users with access permissions.
   :::
3. Right-click the `.xaml` file or project node, and select **Check In**, or click the ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-image-changes-3886ec63.png) icon in the **Status bar**, which also counts the number of uncommitted changes. The **Check In Changes** window is displayed.
4. Review the changes and check the **Show Unversioned Files** box to add imported files to the repository. Write a **Commit Message** to describe the changes.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-167019-7627ab4f.webp)
5. Click **Check In**. The latest version is now available in the repository, together with the **Commit message**. In Studio, the `project.json` file returns to the read-only mode.
6. Click **Start** &gt; **Team** &gt; **Disconnect** to disconnect the current project from source control.
   :::note
   If you edit a file from a project added to source control in an external editor, the change is visible in the **Project** panel and the status bar only after you click **Refresh**![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-refresh-973dda83.png) in the Project panel.
   :::
