UiPath Documentation
studio
latest
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

Studio 用户指南

使用 TFS 管理项目

支持 Team Foundation Server 版本为:

  • 2012
  • 2013
  • 2015
  • Express 2012
  • Express 2013
  • Express 2015
    备注:

    Studio 仅适用于服务器工作区。如果 Studio 创建的工作区在 Studio 外部更改为本地工作区,则无法从 TFS 打开项目。

在 Studio 中设置 TFS

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

  2. Select Servers. The Add/Remove Azure DevOps Server window is displayed.

  3. Select the Add button. The Add Azure DevOps Server window is displayed.

    备注:

    如果在尝试添加 TFS 服务器时 Studio 崩溃或无法响应,请从 C:\Users\<username>\AppData\Roaming\Microsoft Visual Studio\15.0_xx\Team Explorer 删除配置文件,重新启动 Studio,然后重试。

  4. Fill in the details of your TFS repository and select 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.

如果 TFS 服务器处于联机状态(例如,https://<account>.visualstudio.com),则请求使用 MicrosoftAccount 进行身份验证。

备注:

默认情况下,在所有 Windows Server 计算机上,都不会显示此窗口,因为它要求运行 JavaScript。可以通过 Internet Explorer 设置(“安全性”选项卡>“自定义级别”>“启用脚本”)来启用此功能。

结果

TFS is connected in Studio. Your team's collections and projects are available in the Connect to Azure DevOps Server window.

从 TFS 打开项目

  1. In the Team tab, select Open from TFS. The Connect to Azure DevOps Server window is displayed.

    备注:

    “连接到 Azure DevOps Server”窗口包含在连接到存储库时用于切换用户的选项。

  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, select Connect. The Repository Browser opens.

  3. 在存储库浏览器中,您可以浏览并选择现有文件夹或复制“选定路径”

  4. Select 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 button.

  5. Pick a Check out directory. The project name is added to the checkout directory by default. Select Open. The project.json, .xaml and other files stored in the repository project folder are mapped locally.

  6. 当您从 Studio 打开文件时,例如 Main.xaml,“问题”对话框随即打开,并提供两个选项用于从存储库中提取文件:

    • “签出最新版本并进行编辑”- 在编辑模式下,从存储库中打开 Main.xaml 文件的最新版本。中断锁定选项表示文件已被其他用户签出。通过使用此选项,您可以在不通知用户的情况下删除锁定。
    • 以只读方式打开本地版本 - 以只读模式打开 Main.xaml 文件的本地版本。即使文件处于只读模式,也可以打开包管理器,但是为了执行更改和安装依赖项,需要签出 project.json 文件。

      选中“始终签出最新版本并编辑,不再显示”复选框,如此一来,在其后续出现时,“签出最新版本并编辑”选项便会传播您的选择。无论您选择哪个选项,都需要单独签出 project.json 文件,以使特定更改生效。

    备注:

    如果从 TFS 存储库中仅签出了库项目的 .xaml 文件,则 .screenshots 文件夹不会更新。对文件夹使用“获取最新版本”以获取文件。

结果

The project is checked out from the TFS repository and available locally in Studio for editing.

向 TFS 中添加项目

  1. Create or open a project in Studio. Select Start > Team > Add to TFS button, or Add to Source Control > 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, select 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 select Create Folderdocs image above the left navigation pane to add a new folder. Select OK to confirm the selection and close the window.

  3. 将显示添加到 TFS 项目窗口。要将项目添加到特定文件夹中,请在远程子文件夹框中提供一个相对路径,或使用 docs image 按钮打开存储库浏览器。

  4. Select Add. The Check in Changes window opens.

  5. Select the files you want to check in and write a Commit Message. Select Check In. The project files are added to the TFS repository, and checked out locally, except for the project.json file.

结果

The project files are committed to the TFS repository and checked out locally. The project.json file is excluded.

将项目添加到 TFS 时,“项目”面板中的上下文菜单包含 TFS 专属选项。 有关更多信息,请参阅“SVN 和 TFS 的上下文菜单选项”

编辑和签入对 TFS 的更改

  1. 将您的一个项目连接到 TFS 存储库。

  2. Open the context menu for 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.

    备注:

    一旦从 TFS 存储库签出某个文件,其他拥有访问权限的用户便无法再签出该文件。

  3. Open the context menu for the .xaml file or project node, and select Check In, or select the 文档图像 icon in the Status bar, which also counts the number of uncommitted changes. The Check In Changes window is displayed.

  4. 检查更改并选中“显示无版本文件”框,以将导入的文件添加到存储库中。写入“提交消息”来描述更改。

  5. Select 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. Select Start > Team > Disconnect to disconnect the current project from source control.

    备注:

    如果您在外部编辑器中编辑添加到来源控件的项目中的文件,则仅在您单击“刷新”后,更改才会在“项目”面板和状态栏中显示文档图像在“项目”面板中。

结果

The changes are committed to the TFS repository. The project.json file returns to read-only mode in Studio.

  • 在 Studio 中设置 TFS
  • 结果
  • 从 TFS 打开项目
  • 结果
  • 向 TFS 中添加项目
  • 结果
  • 编辑和签入对 TFS 的更改
  • 结果

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新