代码之家  ›  专栏  ›  技术社区  ›  JdeBP

TFS 2017的Powershell cmdlet在哪里?

  •  0
  • JdeBP  · 技术社区  · 7 年前

    我有一个2008年的软件 TFSBuild.proj 在从2008年迁移到2017年的TFS存储库上。我有一个TFS 2017构建代理,已在其上安装Visual Studio 2017(15.7.6)。

    只有来自的自动迁移路径 到XAML构建。但三年来,XAML构建一直在逐渐消失。” Where is the TFS build process going? In 2017 they require an older build agent from 2010 to 2013 ,我只有一个2017年的构建代理(和2008年的构建代理)。

    没有自动迁移到有点不明智的“vNext”构建系统的路径。(它现在是“最新的”,并阻碍了命名微软的 下一个 构建系统。 )所以我一直在手工编写自己的构建定义,手工转换旧的

    它过去所做的一些工作涉及内部编写的DLL中的自定义MSBuild任务,例如使用 Microsoft.TeamFoundation.VersionControl.Client 获取最新成功构建的最新变更集,方法是获取名称与特定模式匹配的最新标签,然后查看其所有项的变更集ID。在“vNext”构建定义中,这似乎是另一个(我已经有了一些)不错的小Powershell任务的捷径, calling the Powershell TFS cmdlets .

    The TFS 2017 release notes say that there are no Power Tools for TFS 2017, and claim that they have been integrated into TFS proper. 我的TFS 2017构建代理似乎并非如此:

    PS C:\> Get-TfsServer
    Get-TfsServer : The term 'Get-TfsServer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + Get-TfsServer
    + ~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Get-TfsServer:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    
    PS C:\>
    

    如果可以的话,我宁愿使用Microsoft cmdlet,也不愿为了我之后的程序员而自己创建cmdlet。毕竟,我 那个程序员,处理上一次为构建系统创建的内部扩展。

    那么我有什么选择呢?

    1 回复  |  直到 7 年前
        1
  •  0
  •   BlitzThunderWolf93    7 年前

    我建议做一些搜索 . 如果TFS真的不符合命令,请考虑查看PSGORACE。您可能已经在库中尝试管理了用于技术的cmdlet。

    尝试: 查找命令*tfs*

    推荐文章