DCSIMG
September 2009 - Posts - Baruch Frei
Sign in | Join | Help

September 2009 - Posts

Team Build 2010 – Build Controller

Published at Sep 17 2009, 04:23 PM by BaruchF

In TFS 2005 we introduced the concept of Build Machine that ran the

build service and had the ability to compile and run team builds.

The build machine was hardcoded in the build script and couldn’t be

change unless modifying the script. A build request to busy machine

leaded to an error.

In TFS 2008 the concept was upgraded to Build Agent that manages

the connection between the build and build machine. As all the build definitions

in TFS 2008 it’s stored in the Database and it’s not hardcoded in the script.

The build agent knows to manage a queue of builds and a build request to a busy

machine enters the queue and waits for it’s turn. Another abilities are to change

the target agent when requesting a build (overriding it’s default agent), and

installing two agents on the same machine using this method.

In TFS 2010 we announced a new concept: Build Controller.

The Build Controller manages the Build Agents and knows to queue the

requested build to the most available agent. Installing new agent (on the same

machine or on another machine) became much easier. Everything is done from

the new Team Foundation Administration Console  :

image

(notice the new agent button).

Another change is that the build process is now separated to two parts the “controller scope”

and the “agent scope”. The “controller scope” is responsible for the build initialization

(name,drop location etc) and the “agent scope” is responsible for the compilation.

Q. What happens if I want to use a specific Agent because of some prerequisite installed

or preferred machine?

A very good question – but the answer is even better …

A. You can name and tag your Agents :

image

When you request a build you can choose your preferred Agent by name or by tag using

wildcards:

image

I think this is a real quantum leap to have a Build Farm with multiple build agents and

machines and managing it all is pretty easy through the Build Controller.

I’m really looking forward for the release….

 

Happy New Year !

How to avoid annoying authentication window when connecting to TFS

Published at Sep 08 2009, 04:56 PM by BaruchF

When connecting to TFS through Team Explorer it uses the windows login credentials.

If the logged in user has no rights to connect to TFS an authentication window

appears that allows you to enter another credentials in order to connect to TFS.

image  

But sometimes even though the logged in user has the required permission this annoying

window appears and you must enter your credentials again. This happens every time you

open Visual Studio and is really bothering.

This problem may lead to another problem when trying to connect to TFS through code

in VS AddIn or any other application for example using this code:

TeamFoundationServer tfs = new TeamFoundationServer(
                                            "http://tfsserver:8080");               
tfs.EnsureAuthenticated();

You will get an exception ” TF30063: You are not authorized to access <tfsserver>”.

This happens because when connecting to TFS without providing credentials it uses the

stored credential in the credential cache, but this cache is faulty.

Of course, you can impersonate when connecting to TFS in this way:

NetworkCredential nc = new NetworkCredential(
                                        "UserName",
                                        "Password",
                                        "Domain");
TeamFoundationServer tfs = new TeamFoundationServer(
                                        "http://tfsserver:8080",
                                         nc);
tfs.EnsureAuthenticated();

Solution:

  • Close all Visual Studio instances.

  • Delete TFS client cache stored in:
    %LOCALAPPDATA%\Microsoft\Team Foundation\2.0
    under Vista/Windows 7. Or
    %USERPROFILE%\Local Settings\Application Data\Microsoft\Team Foundation\2.0
    under Windows XP.

    (1.0 = TFS2005 | 2.0 = TFS2008 | 3.0 = TFS 2010)

  • Restart your system (even though logoff & login might act the same but restart is always good idea :-) )

Worked for me, HTH.