如何使用 C# 在 tfs 中创建具有本地文件夹映射的工作区 [英] How do I create a workspace with local folder mappings in tfs using C#

查看:38
本文介绍了如何使用 C# 在 tfs 中创建具有本地文件夹映射的工作区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试自动将最新代码从 TFS 服务器获取到本地路径.为此,第一步是在 TFS 服务器中创建一个工作区(如果尚不存在).我将如何创建将本地文件夹映射到服务器文件夹的工作区.

I am trying to automate to get the latest code from TFS server to local path. The initial step for this is to create a workspace in TFS server if not exist already. How will i create the workspace with local folders mapping to the server folders.

推荐答案

使用 VersionControlServer.CreateWorkSpace 方法来创建工作区并设置工作文件夹(使用接受 WorkingFolder[].或者在初始创建后更新工作区.您可以随时向工作区添加额外的映射和伪装及时.

Use the VersionControlServer.CreateWorkSpace method to create a workspace and set the working folders (use one of the overloads that accepts a WorkingFolder[]. Or update the workspace after initial creation. You can add addtional mappings and cloaks to the workspace at any point in time.

进入 VersionControlServer使用这篇文章中描述了 API.

这篇关于如何使用 C# 在 tfs 中创建具有本地文件夹映射的工作区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆