How to add a (TFS 2008) build agent to a TFS 2013 build controller that is also a build agent? - tfs

We're working on migrating our build solution from TFS 2008 to TFS 2013. As a part of that process, I am trying to add a clone of (one of) the current build agents (based on TFS 2008 and Visual Studio 2010) to the new TFS 2013 build controller, to make sure that we have the ability to run builds with the same environment that we do now. (This capability will be needed for some time e.g. for minor updates, hotfixes etc.) The clone has been created, started, and given a separate DNS name on the network, to allow it to be addressed.
Currently, our new environment has a TFS server, as well as a build server that hosts both the build controller and one build agent; all TFS 2013. (I'd rather see that the build controller at least ran on the TFS server VM, or ideally on a completely separate VM, but this is what it's like right now.)
When I log in to the new build controller/agent and run the Team Foundation Server Administration Console, then go into Build Configuration under that host's root node, it shows the build controller as well as the build agent (both with the same name because they are running on the same VM).
When I click "New Agent...", I expect to be able to add a new build agent (that's what the link says, after all). This is also what Microsoft indicates you should do in their documentation. However, what happens is that I get a window titled "Build Agent Properties" that appears to show the details for the existing build agent configuration. Specifically, it pre-populates the "Computer Name" field with the name of the existing build agent and has selected the existing (TFS 2013) build controller. The "Build Agent service is enabled" checkbox is checked, but the box immediately underneath that checkbox says "Build Agent status is Offline". In the main administration console window, both the controller and agent show as "Ready", and they have executed builds previously. I also cannot edit the "Computer Name" field.
So, to recap:
When the TFS 2013 build controller is also a TFS 2013 build agent, how do I add a second (TFS 2008-based, in my case) build agent to the build controller?
I imagine I'm missing something really trivial, but I just cannot see what, and Googling has turned up seemingly nothing of relevance.

Click "New Agent...", change the 'display name', click ok and you'll get a new (2013) build agent.
You're going to have to upgrade your existing 2008 build agent. IIRC 2010 build agents only connect to 2012 controllers if they're patched with sp1 so you've got no chance with 2008.

Related

Visual Studio Online - Error TFS 22501 with XAML Build Definition 2

Currently, we are using TFS 2012 and we have a heavily customized build process as described below.
1. Build the source
2. Run an EXE as console to host WCF services
3. Restore databases on local sql server
4. Run functional test
5. delete databases
6. close the exe started in step 2.
7. Create an Installable exe using WiX ( Wix with custom bootstratpper)
8. Update version number file to TFS
Now we want to move to Visual Studio online from onpremise. Trying to setup a build process with Private Build agent. I have created an VM , installed and registerd agent. I do see agent name back in website.
When I go back to Visual studio and try to create new xaml build definition I am getting below error.
TFS22501: Creating a build definition requires a build controller be defined for this team project collection. There may not be any controllers configured or you may not have permissions to view them. contact your team foundation server administrator.
can somebody please help ?
If you're using XAML build, you have to use the old-style XAML build controller/agent. The VSTS agent is for the new build system.
I would strongly recommend migrating your builds to the new build system as part of your migration to VS Team Services, as the XAML build system is effectively dead.

TFS Build Agent not accepting work

Using on-prem TFS 2017, I have added an additional agent to an existing pool. The agent is displayed in the pool/queue management pages, is enabled, and is in an idle state. The logs reflect a healthy agent that is listening for work, but the TFS controller won't designate work to it (as far as I can tel). I have tried disabling the other agent as well as stopping the other agent's service. In either situation, the build status states there are no available agents to perform work. I have other agents running in different pools that are all functioning properly, so I am not sure how to determine whats at fault: agent/agent configuration, queue/pool configuration, or the TFS controller it self.
I finally found the issue:
While MSBuild and all the relevant Microsoft SDK's required for my builds were installed and properly reflected in the agent's capabilities, Visual Studio was not installed on the new build server.
I was not able to determine why the agent(s) was rejected for insufficient capabilities; we were running TFS 2015 update 2, but after an update to TFS 2017, the agents are no longer dependent on Visual Studio being installed and work just fine running the same build definitions with the MSBuild step.

Upgrading my build agent to .Net 4.6.1 did not work

So, I tried to upgrade my TFS 2015 to allow project with .NET 4.6.1.
I downloaded the Targeting Pack for .NET 4.6.1, ran it, restarted the server, ran my build configuration for the build agent by overwriting the old settings, and started my builds.
Now non of them will build :(
I think I miss setting a parameter somewhere.
This is my agent, which is registered, but never requested (for some odd reason):
Am I missing something?
According to your agent.version 1.95.3, seems you are using TFS2015 update3 which should definitely support .Net 4.6.1. And the system capabilities of your agent looks okay except the Number_OF_PROCESSOR. Your value is 1, but usually the default is 8. Did you manually change the value during the configure?
Recommend you follow below way to narrow down this issue:
First check in that if the build server is available and enabled in
TFS at https://YOURCOMPANYNAME:8080/tfs/_admin/_AgentQueue, and
your build agent should be “Green”.
Make sure the agent is in interactive mode.
Try to change a domain account which is a member of the Build
Agent Service Accounts group and belongs to "Agent Pool Service
Account" role, to see whether the agent would work or not.
Double check whether there are some Firewall interface block the
build, try to disable all related settings.
If it's still not work, delete that agent and re-deploy a new one following the detail steps in this article. You can also go through below similar questions to check if there is some useful info :
TFS 2015 On-premise issues
TFS 2015 build vNext - hangs with "Waiting for console output from
an agent..."
TFS 2015 Build agent won't start

How do I install prerequisites for TeamCity to connect to Team Foundation Server Version Control?

I've installed the prerequisite (Team Explorer 2013) to the best of my knowledge, but when I try to set up a VCS root to connect to our TFS Version Control server, I continue to get this error message:
"No TFS assemblies were found on the system. Please make sure you have
Microsoft Team Explorer installed. Supported versions: 2015 2013 2012
2010 2008 2005"
The Team Explorer I downloaded from Microsoft just seemed to be a plugin for Visual Studio, which doesn't make much sense as a server-side component. Anyway, I configured a connection to our TFS box within Team Explorer/Visual Studio on my TeamCity server.
So I have two questions that seem to be undocumented by JetBrains:
What does it mean to set up and configure Team Explorer? How can I validate that I have set up and configured Team Explorer on my TeamCity server correctly?
How does TeamCity know how to find the Team Explorer assemblies? Is there some sort of configuration I am supposed to do? Where is this documented?
I guess I'm looking for a true step-by-step set of instructions that make no assumptions about my understanding of TFS or Team Explorer, or any assumptions about what I may have already installed on my TeamCity box.
I've read the two articles on the JetBrains site regarding how to set this up, and they don't cover actually installing and configuring the prerequisites or configuring TeamCity to discover the Team Explorer assemblies it needs.
Team Explorer is the client software that you use to access Visual Studio Team Foundation Server functionality from Visual Studio. You can simply launch Team Explorer on your TeamCity server to create a team project and check in a project, to validate whether it is installed correctly.
I couldn't find any documentation that mentioned how does TeamCity find Team Explorer assemblies. But, based on my understanding, there is no configuration needed to detect Team Explorer. Please make sure your TeamCity server is running under Windows.
If the issue that can't find Team Explorer persists, you can install VS Premium instead of Team Explorer.
Setting up Jetbrains TeamCity for CI with Team Foundation Server:
Install Jetbrains TeamCity
If you are planning on using IIS or TFS on the same server, configure Jetbrains TeamCity to run on a port other than 80 or 8080
Once TeamCity is up and running, you can begin configuring your TeamCity installation for CI Builds.
Log into TeamCity with your user name and password
Create a new TeamCity Project
Create a new build configuration
You will now see a series of build configuration settings that you will have to complete presented in a Wizard-style navigation view.
Enter General Settings
Enter VCS Settings
After entering VCS Settings, Create and attach new VCS Root
Enter the relevant information for your TFS instance
Create a Build Step using Visual Studio as your build runner. You can create as many build steps as you need and specify the order of the steps (similar to a TFS Build Workflow).
For setting up Continuous Integration builds, you will need to specify a Build Trigger. CI Builds will generally use a VCS Trigger that is triggered on each source control check-in.
If you need to pass any parameters to your build, you can configure these in your Build Parameters.
That is all! You can then either run your Builds manually by clicking on the Run button in TeamCity or simply verify that your builds are triggered by the next check-in into TFS.

TFS 2013: Adding a new build agent on a different machine

For my TFS 2013 server on machine "A" with one build controller configured, I am trying to add another build agent that's located on another machine "B". the new build agent on machine "B" should be controlled by the same build controller of machine "A". TFS 2013 on machine "B" is installed.
To accomplish this, in Team Foundation Administration Console of machine "A" under "Build Configuration", I use the function "New Agent..." to add a new agent.
Problem is that I cannot change the "Computer Name" because it is geyed out. How can I add the agent of machine "B"?
Thanks for helping me out!
You need to install team build (from the TFS installation disk) on the other server. Then only configure the Team Build section. When you get to the creation of the controller/agent, only select agent, from there you'll be able to select the other controller (A).
Cheers,
ET

Resources