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

家住魔仙堡 提交于 2019-12-11 01:54:01

问题


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.


回答1:


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.

Getting to the VersionControlServer and connecting to TFS using the API is described in this post.



来源:https://stackoverflow.com/questions/21682662/how-do-i-create-a-workspace-with-local-folder-mappings-in-tfs-using-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!