【问题标题】:How to get tf.exe (TFS command line client)?如何获取 tf.exe(TFS 命令行客户端)?
【发布时间】:2011-07-27 02:34:44
【问题描述】:

要获得“tf.exe”程序,我需要安装的最少软件数量是多少?

【问题讨论】:

    标签: tfs installation command-line-interface tf-cli


    【解决方案1】:

    您需要安装Team Explorer,最好安装与您正在使用的 TFS 版本匹配的 Team Explorer 版本,例如如果您使用的是 TFS 2010,请安装 Team Explorer 2010。

    2012版http://www.microsoft.com/en-gb/download/details.aspx?id=30656

    2013版http://www.microsoft.com/en-us/download/details.aspx?id=40776

    2019版https://visualstudio.microsoft.com/downloads/#visual-studio-team-explorer-2019

    您也可能对TFS power tools 感兴趣。他们添加了一些额外的命令行功能(使用tfpt.exe),还添加了一些额外的 IDE 功能。

    【讨论】:

    • 如果是Visual Studio安装的,应该在“C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE”或“C:\Program Files\Microsoft Visual Studio” 10.0\Common7\IDE"
    • +1 Michael -- 然后,natch,如果 TF.exe 不在您的 PATH 上,请在 Windows 资源管理器中右键单击计算机,选择属性、高级系统设置、环境变量、系统变量、路径、编辑,将; 然后C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE 添加到变量值中当前字符串的末尾。然后 Windows-R,cmd,输入,tf。瞧。 QED。利润。 You had TF the whole time.
    • 我安装了 Team Explorer 2010 和电动工具,但我的 Explorer(右键单击)扩展在 Server 2012 中不起作用。
    • 仅供参考,对于 TFS 2013,您似乎需要基于 Java 的 Team Explorer Everywhere 2013。在这里添加它,因为我只是需要它。
    • 对于 VS 2019,我在 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer 找到了我的。我用dir tf.exe /S 做了一个大胆的搜索来找到它,fwiw。不要忘记add the dir to your PATH,如果它还没有的话
    【解决方案2】:

    我在虚拟机中,并试图使我的 VHD 尽可能小,所以我发现 Team Explorer 是一个非常重量级的解决方案(安装 300+ MB)。作为替代方案,我有幸将一组最小的 EXE/DLL 从 Team Explorer 安装复制到干净的机器上(当然,仍然需要 .NET 4.0)。

    到目前为止,我只尝试了一些操作,但是这组文件(大约 8.5 MB)已经足以通过 tf.exe 获得基本的源代码控制功能:

    • TF.exe
    • TF.exe.config
    • Microsoft.TeamFoundation.dll
    • Microsoft.TeamFoundation.Client.dll
    • Microsoft.TeamFoundation.Common.dll
    • Microsoft.TeamFoundation.Common.Library.dll
    • Microsoft.TeamFoundation.VersionControl.Client.dll
    • Microsoft.TeamFoundation.VersionControl.Common.dll
    • Microsoft.TeamFoundation.VersionControl.Controls.dll

    (不用说,这是一个完全不受支持的解决方案,它不会让您摆脱正常的 TFS 许可要求。)

    根据您执行的操作,您可能会发现需要额外的 DLL。幸运的是,tf.exe 会产生一个很好的错误消息,告诉你哪些是丢失的。

    【讨论】:

    • 这是一件美丽的事情。我确实需要 Microsoft.TeamFoundation.Build.Controls.dll 来签入。
    • 我在 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE 中找到了 tf.exe 及其 .config,在 C:\Program Files (x86) 中找到了 VersionControl.Controls.dll \Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies 和 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0 中的 DLL。
    【解决方案3】:

    对于 Visual Studio 2017 和 2019,可以在此处找到:

    -将 {YEAR} 替换为适当的年份(“2017”、“2019”)。

    -将 {EDITION} 替换为适当的版本名称(“Enterprise”、“Professional”或“Community")

    C:\Program Files (x86)\Microsoft Visual Studio\{YEAR}\{EDITION}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe
    

    对于 Visual Studio 2022,可以在此处找到:

    C:\Program Files\Microsoft Visual Studio\2022\{EDITION}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
    

    【讨论】:

    • 适用于企业版。如果使用 Professional 试试这个:C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
    • 谢谢,我在回答中添加了详细信息。
    • 能否用于AzureDevOps?
    【解决方案4】:

    Team Explorer Everywhere 安装中有一个 Java TFS 客户端(连同一个 Eclipse 插件)。看http://www.microsoft.com/en-us/download/details.aspx?id=30661

    【讨论】:

      【解决方案5】:

      供参考:这些是 Visual Studio 2017 所需的 DLL(就像 VS 2010 的 @ijprest 一样)

      TF.exe
      TF.exe.config
      Microsoft.TeamFoundation.Client.dll
      Microsoft.TeamFoundation.Common.dll
      Microsoft.TeamFoundation.Core.WebApi.dll
      Microsoft.TeamFoundation.VersionControl.Client.dll
      Microsoft.TeamFoundation.VersionControl.Common.dll
      Microsoft.TeamFoundation.VersionControl.Controls.dll
      Microsoft.VisualStudio.Services.Client.Interactive.dll
      Microsoft.VisualStudio.Services.Common.dll
      Microsoft.VisualStudio.Services.WebApi.dll
      

      它们将在我的基础 VM 映像中。在安装新服务器时,我将使用它将最新的部署脚本从 VC 拉到一个临时的本地工作区文件夹。

      tf workspace /new ... 
      tf workfold /map ...
      tf get "%WorkSpaceLocalFolder%" /recursive
      tf workfold /unmap 
      tf workspace /delete
      
      <run deployment scripts from "%WorkSpaceLocalFolder%" >
      
      rmdir "%WorkSpaceLocalFolder%"
      

      (很抱歉将其发布为答案,但我没有足够的声誉发表评论,我认为应该如此)

      【讨论】:

      • 这也适用于 VS2019。还需要加Microsoft.TeamFoundation.Diff.dll
      【解决方案6】:

      tf.exe 命令行包含在文件夹 externals\vstsom 中的 VSTS 代理程序包中。

      【讨论】:

        【解决方案7】:

        Visual Studio 2017 团队资源管理器

        根据https://blogs.msdn.microsoft.com/bharry/2017/04/05/team-explorer-for-tfs-2017/,您现在可以通过此链接从 Visual Studio 单独下载它:

        https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=TeamExplorer&rel=15

        【讨论】:

          【解决方案8】:

          您还可以尝试使用 Node.js 的 TFS CLI,它是 Microsoft Team Foundation Server 和 Visual Studio Team Services 的跨平台 CLI。

          【讨论】:

            【解决方案9】:

            从上面的早期答案开始,但基于 VS 2019 安装;
            我需要运行“tf git permission”命令,并从中复制以下文件:

            C:\Program Files (x86)\Microsoft Visual Studio\2019\TeamExplorer\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer

            Microsoft.TeamFoundation.Client.dll
            Microsoft.TeamFoundation.Common.dll
            Microsoft.TeamFoundation.Core.WebApi.dll
            Microsoft.TeamFoundation.Diff.dll
            Microsoft.TeamFoundation.Git.Client.dll
            Microsoft.TeamFoundation.Git.Contracts.dll
            Microsoft.TeamFoundation.Git.Controls.dll
            Microsoft.TeamFoundation.Git.CoreServices.dll
            Microsoft.TeamFoundation.Git.dll
            Microsoft.TeamFoundation.Git.Graph.dll
            Microsoft.TeamFoundation.Git.HostingProvider.AzureDevOps.dll
            Microsoft.TeamFoundation.Git.HostingProvider.GitHub.dll
            Microsoft.TeamFoundation.Git.HostingProvider.GitHub.imagemanifest
            Microsoft.TeamFoundation.Git.Provider.dll
            Microsoft.TeamFoundation.SourceControl.WebApi.dll
            Microsoft.TeamFoundation.VersionControl.Client.dll
            Microsoft.TeamFoundation.VersionControl.Common.dll
            Microsoft.TeamFoundation.VersionControl.Common.Integration.dll
            Microsoft.TeamFoundation.VersionControl.Controls.dll
            Microsoft.VisualStudio.Services.Client.Interactive.dll
            Microsoft.VisualStudio.Services.Common.dll
            Microsoft.VisualStudio.Services.WebApi.dll
            TF.exe
            TF.exe.config
            

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 1970-01-01
              • 2022-01-26
              • 2019-01-02
              • 2011-09-19
              • 1970-01-01
              • 1970-01-01
              • 2019-03-26
              • 2014-02-20
              相关资源
              最近更新 更多