I have two configured build agents on one controller:
- Default agent
- Default agent
I defined an assembly definition with the following agent settings:
Maximum Agent Execution Time: 00:00:00 Maximum Agent Reservation Wait Time: 04:00:00 Name Filter: Default Agent Tag Comparison Operator: MatchExactly Tags Filter:
I created several BuildInformation Activities after the GetAgent action.
String.Format("Build Agentname: {0}", BuildAgent.Name)String.Format("AgentSettingsName: {0}; AgentSettingsTags: {1}", AgentSettings.Name, String.Join(",", AgentSettings.Tags))
Exit:
AgentScope (reserved build agent Default Agent1) Build Agentname: Default Agent1 AgentSettingsName: Default Agent; AgentSettingsTags:
Therefore, the AgentSettings.Name argument is AgentSettings.Name to "Default Agent," but, paradoxically, the "Default Agent 1" is used.
Workflow: 
It is strange that sometimes the correct build agent is selected.
This is mistake? What is my mistake?
It would be nice if someone could reproduce this behavior too.
EDIT:
I created an error message: https://connect.microsoft.com/VisualStudio/feedback/details/725885/tfs-2010-wrong-build-agent-is-choosen
source share