# 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-167141-c4e70752.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-170379-d729fec3.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\<username>\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-172400-912f2082.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-169137-2c93420e.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 ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-button_repo_browser.png-30e28591.webp) button.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-169692-8a3c2993.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-167485-0423a892.webp)

     :::note
     If you check out only the &lt;code&gt;.xaml&lt;/code&gt; file of a library project from the TFS repository, the &lt;code&gt;.screenshots&lt;/code&gt; 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** ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-add_resource.png-92dbe167.webp) 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-168445-2c93420e.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 ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-button_repo_browser.png-30e28591.webp) button to open the repository browser.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/studio/studio-167381-08c6323e.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](about-automation-projects.md).

## 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-changes.png-ecc2de1f.webp) 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-168537-8b287b65.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-refresh.png-fa380117.webp) in the Project panel.
   :::
