简体   繁体   English

如何使用C#在tfs中使用本地文件夹映射创建工作区

[英]How do I create a workspace with local folder mappings in tfs using C#

I am trying to automate to get the latest code from TFS server to local path. 我正在尝试自动将最新的代码从TFS服务器获取到本地路径。 The initial step for this is to create a workspace in TFS server if not exist already. 第一步是在TFS服务器中创建工作空间(如果尚不存在)。 How will i create the workspace with local folders mapping to the server folders. 我将如何使用映射到服务器文件夹的本地文件夹创建工作区。

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.CreateWorkSpace方法创建工作空间并设置工作文件夹(使用接受WorkingFolder[]的重载之一。或者在初始创建后更新工作空间。您可以在以下任何位置向工作空间添加其他映射和隐身衣时间。

Getting to the VersionControlServer and connecting to TFS using the API is described in this post . 这篇文章描述了如何使用API​​连接到 VersionControlServer连接到TFS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM