0
我在我的項目中有兩個構建定義,但它返回的零構建定義。下面是我的代碼獲取構建定義。誰能幫忙?從vsts返回零的構建定義
// Get a reference to a build service
IBuildServer buildserver = (IBuildServer)tfs.GetService(typeof(IBuildServer));
IBuildDefinition[] buildDefinitions = buildserver.QueryBuildDefinitions(project);
foreach (IBuildDefinition buildDefinition in buildDefinitions)
{
string buildDefinitionName = buildDefinition.Name;
Console.WriteLine(buildDefinitionName);
Console.WriteLine(buildDefinition.ProcessParameters.ToString());
}
TFS什麼版本的?什麼樣的構建(XAML或2015/VSTeam)?你在傳遞QueryBuildDefinitions的'project'參數到底是什麼? – jessehouwing