gpt4 book ai didi

c# - 重新定位丢弃的 TFS 构建

转载 作者:太空宇宙 更新时间:2023-11-03 16:33:07 24 4
gpt4 key购买 nike

我需要移动包含 TFS 构建的文件共享,因此我编写了一些代码来遍历构建集合并更新它们的放置位置。我知道代码做了某事,因为当我在第二次运行时调试代码时,droplocation 现在显示新的 unc 路径。但是,当我进入团队资源管理器并单击构建的“放置位置”时,我被带到了旧位置。

我错过了什么?

var buildServer = tpc.GetService<IBuildServer>();
foreach (var build in buildServer.QueryBuilds(projectName))
{
string newDropLocation = FixPath(build.DropLocation);
string newLogLocation = FixPath( build.LogLocation);

build.DropLocation = newDropLocation;
if(!String.IsNullOrEmpty(newLogLocation))
{
build.LogLocation = newLogLocation;
}
build.Save();

Console.WriteLine("------------");
Console.WriteLine(newDropLocation);
Console.WriteLine(newDropLocationRoot);
Console.WriteLine(newLogLocation);
}

最佳答案

似乎这个功能现在内置到Community TFS Build Extensions中了.社区 TFS 构建管理器能够搜索和替换现有构建的更新。

关于c# - 重新定位丢弃的 TFS 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10146783/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com