使用 tfs 检查 CI 中的程序集信息

check in assembly info in CI with tfs

如何在 tfs 中检查程序集信息? 我正在使用 tfs CI 并且我有一项工作 space,当我尝试签入待定时:

2017-09-10T17:37:40.3410618Z No files checked in. 2017-09-10T17:37:40.8732772Z There are no pending changes matching the specified items.

更改,tfs 日志显示没有未决更改,但我的 dll 版本是正确的。 我可以在 visual studio 待更改中看到 assemblyinfo 文件。 我在 CI 中使用 assemblyinfo 插件,我正在使用 powershell 命令签入:

Tf.exe checkin $/[path]/assemblyinfo.cs

当您在本地 VS 中构建时,文件 assemblyinfo.cs 在工作区(源代码管理中映射的项目)中生成,并将在“待定更改”页面中自动检测到。

但根据您的描述,您是使用 TFS 构建的,这意味着文件 assemblyinfo.cs 尚未在源代码管理中。除非你publish/add输出到active workspace就像用VS在本地构建一样,那么你可以直接check in。否则您必须先将文件添加到源代码管理,然后再签入。

所以,首先尝试 运行“tf status”命令,它会显示待处理更改的列表。

tf stat /collection:http://server:8080/tfs/Collection

如果该文件未列出,只需 运行 tf add first, then tf checkin(您需要先将目录更改为映射的文件夹)