使用 powershell 从 TFS 2010 签出文件 [英] Check-Out files from TFS 2010 with powershell

查看:35
本文介绍了使用 powershell 从 TFS 2010 签出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想使用 powershell 签出一条路径,并在一分钟后在 Team Foundation Server 上签入此路径.

I only want to check out a path with powershell and also check in this path one minute later at Team Foundation Server.

我该怎么做?

我已经在我的服务器上安装了 tfs power tools.

I have installed the tfs power tools at my server.

推荐答案

您不需要电动工具.只需使用带有 TFS 团队资源管理器的 Visual Studio 附带的 tf.exe 命令行实用程序.tf edit <文件>/noprompt 签出和 tf checkin /comment:$comment/noprompt 签入.查看 tf.exe 上的命令行用法以获取更多信息 tf/?tf checkin/?.您将需要使用 tf.exe 的路径配置 PowerShell 会话.这通常由 VS vars 批处理文件完成.但是您应该能够像这样简单地添加到路径中:$PATH += "${VS110COMNTOOLS}..\Ide".

You don't need the power tools. Just use the tf.exe command line util that comes with Visual Studio with TFS Team Explorer. tf edit <file> /noprompt to check out and tf checkin <file> /comment:$comment /noprompt to check in. Look at the command line usage on tf.exe for more info tf /? and tf checkin /?. You will need to configure your PowerShell session with the Path to tf.exe. This is usually done by the VS vars batch files. But you should be able to simply add to the path like so: $PATH += "${VS110COMNTOOLS}..\Ide".

这篇关于使用 powershell 从 TFS 2010 签出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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