So you could make a script that can do the bits below but if you don’t here is how you can easily create build agents fast for TFS 2015+ or VSO.

Now I’m not saying you should run a million agents of a single machine but this could be applied the same if you switching between multiple TS sessions to configure on multiple servers.

Download the build agent

Downloading the build agent is really simple. Navigate to your TFS control panel, click on Agent pools and then Download agent.


This post will assume you have setup your agent pool already but that’s as simple as click New pool and giving it a name on the screen above Smile

Setup agent file structure

Copy this to your build server and then extract the zip to look like below for example, create these folders.


then inside each of those folders you place a copy of the extracted zip



Get your configuration details

For this step we going option up old trusty notepad. What you are going to need is the following info in notepad, put each of these on a new line

  • Agent Name
  • Url to TFS
  • Agent Pool
  • Working directory (a blank line to use the default which is where your agent is with _working)
  • Configure as a windows service (this post assumes a y)
  • Service run as username
  • Service run as password
  • another empty line

this should look something like this


Setup lots of agents

This part is now fast Smile. Make sure you in the directory with your ConfigureAgent.bat file


Run the ConfigureAgent.bat as administrator


You should see something like this now


Copy everything in your notepad, so you should have all that config with the extra new line at the end. Now right click in cmd and paste


and that would all work (if you want it to stay open you can open a cmd in admin and then run the bat file from there)


Now go to each folders ConfigureAgent.bat and run as admin, paste in the same config (changing just the agent name to increment the number at the end)

All Done

At this point if you go to your agent pool in TFS you will see they are all setup.



In my last post (Introduction to DotNet Pretty) I mentioned that I would be added more visualizers to DotNet Pretty soon Smile. Today I finally managed to get around to that and added some visualizers for TFS Work Items.

3 new visualizers were added 2 debugger display visualizers and 1 debugger visualizer. The first is for Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemType and just displays the Name of the Work Item Type


The next  one added was for Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem and that displays the Status, Id and Title of a work item which is awesome for viewing the results of a query during debugging Smile.


Now having the above is very useful but drilling down into fields was a nightmare so I decided to create a nice visualizer for Work Item which would show you the work item on a form as it would be inside Visual Studio. You simple click the little arrow next to the value and then click on View Work Item


and then you will notice that your life has just been changed Smile. Any links you click on from within this window will open in the web access and not in another dialog as you might expect.


This work item will show as it is at the current point in the code to the best of the visualizers abilities Smile, in the case above I altered the title just before I opened the visualizer and it kept it's new value as expected Open-mouthed smile.


I have tested this on both On Premise TFS and Online with VSO. The On Premise version did give an issue about COM which I'm hoping is just an issue on my machine/instance but will investigate anyway


I know this is going to help me speed working with the TFS API and I'm hoping it's useful to others as well Open-mouthed smile.


UPDATE: This has been identified as a bug and will be fixed in the next release for on-premise

So if you have a lot customizations in your process template there is a slight chance you would have seen the error below after the upgrade.


If you have completed the Configure Features option


and still see the error odds are you have need to follow similar steps to below

Look for the actual exception

Take a look at the event log under the Microsoft-Team Foundation Server/Debug section of Applications and Services Log


When the error occurs do you see an error? I received the error below that pointed towards something with the add panel being wrong

Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.InvalidProjectSettingsException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.DefaultSettingsValidatorDataProvider.GetFieldType(String workItemTypeName, String fieldReferenceName)
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProcessSettingsValidator.<>c__DisplayClass4b.<>c__DisplayClass4f.<ValidateAddPanels>b__41(String type)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProcessSettingsValidator.<>c__DisplayClass4b.<ValidateAddPanels>b__40(String refName)
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProcessSettingsValidator.ValidateAddPanels()
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProcessSettingsValidator.ValidateContent(OptionalFeatures featuresToValidate)
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProcessSettingsValidator.Validate(OptionalFeatures featuresToValidate, Boolean validateStructureOnly)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProcessSettingsValidator.Validate(OptionalFeatures featuresToValidate, Boolean validateStructureOnly)
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProcessSettingsValidator.Validate(TeamFoundationRequestContext requestContext, ProjectProcessConfiguration settings, String projectUri, Boolean correctWarnings, OptionalFeatures featuresToValidate)
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProjectConfigurationService.GetProcessSettings(TeamFoundationRequestContext requestContext, String projectUri, Boolean validate, Boolean bypassCache)
   at Microsoft.TeamFoundation.Server.WebAccess.WorkItemTracking.Common.ProjectConfigurationService.GetCommonSettings(TeamFoundationRequestContext requestContext, String projectUri, Boolean validateSettings)
   at Microsoft.TeamFoundation.Server.WebAccess.Agile.AgileAreaRegistration.CanDisplayTiles(TfsWebContext webContext)

Find the problem

I went over to the process configuration which seemed to be the logical starting point based off the error on screen and stack trace from the event log. I compared all the customizations I had with what is in the default Scrum 2013.2 template and saw that I had extra fields in one of my Add Panels


I removed these and imported the ProcessConfiguration.xml using the witAdmin importprocessconfig tool, this worked and the site was working as normal without the error.

Fix the problem

Obviously we couldn't just remove the extra fields and be on our way because those were there for a reason. The Add Panel changes were applied for the Requirements Backlog in our case. We took a look at the Categories.xml to verify which the work item types were that were part of the requirements and found the 4 below


We currently only use new Product Backlog Items and the other 3 are "old" work item types that are in TFS because we used to use them and don't want to remove them because there are existing work items of this type in our TFS project. So we went to the 3 other WITd and made sure that they each had these 3 fields, we found as we expected that they didn't have each of them.

After adding the fields we re-imported the WITd for all requirement types and then tried to import the ProcessConfiguration.xml and it imported without any issues and our TFS was working again without any errors.

What Happened then?

Before the update we were obviously using this template so everything use to work, although I must admit it makes more sense that all WITd's need the fields being displayed in the Add Panel for it's categories, it use to not be the case so after upgrading this was a rather unusual error for us. It could possible have been looked at as a bug here this wasn't required to match. If I find out the reason for the change I'll update here Smile


Did you hear? Somasegar blogged that Team Foundation Server 2013 RC is a go-live release. What does that mean for you and your customers? One word


You might be wonder why I'm so excited about this release. One of the many reasons why I'm so excited about this release is because Work Item Charting which was announced last September and then updated in VSO with the November service updates to support Chart Pinning, and now this feature has made it's way to on premise with TFS 2013 Update 2.

Although this was released for on premise 3 weeks ago in the CTP release it was not a go-live release at that point.

Using Chart Pinning to transform your teams dashboard

After upgrading to TFS 2013 Update 2 your pinned items would look something like below.  This information is very useful for your team as it allows you to easily see bugs from your 2 main product sprints with a 3rd tile telling you other bugs that exist across other products. You are also able to see defects which are the bugs that exist out in the real work in builds that have already been deployed.


Getting any value of this is possible but probably a lot more effort at times with all these numbers staring at you. What if you could represent all 7 of these tiles in a way that is easy to take in with a quick glance and at the same time extend on the information about what the other product sprints are that contain bugs.

Enter Chart Pinning, transforming these tiles is as easily as creating a chart for the work item query Open Defects and creating a new query that includes all bugs and not just specific products. Next you pin those charts to your dashboard using the Pin to homepage button


and then also unpin the 7 tiles that we are replacing. With the current library being used for the home page grid you will notice that if you place a chart in the second or third column that it leaves empty spaces to it's left if you have regular queries pinned, for that reason I'd recommend moving the pinned charts to the first and second position on your dashboard and you get something like below which is a lot more meaning full the team to glance at as the are passing the home page


As you can see pinning charts can provide a lot of extra value to your work item data. But let's see how easy it is to dig deeper if you wanted to, we will go through to the Bugs Not Done chart by clicking on the chart (yes the charts work the same way as the tiles do with clicking to go through the query Smile). We'll add a new chart using the Pivot table chart with a row of our team name and have the columns as the product sprint name and change the Sort to label. Click OK and you have the same chart that you would usually only get by exporting your work item results to excel (pre charts) and then need some complicated manual morphing to see the same thing as below


Hopefully you are preparing to upgrade to TFS 2013 Update 2 and if you weren't before reading this you are now planning to upgrade really soon Smile.


This post was originally found on my old blog at http://gbeeming.wordpress.com/2013/06/28/tf400324-team-foundation-services-are-not-available-from-server/.

Full Error

TF400324: Team Foundation services are not available from server <Server/CollectionName>. Technical information (for administrator):   Page not found.


This error could occur if you have moved a collection from one server to another and a client application connects to both servers. In my case this is because I’m running TFS 2012 on one server for production use and have backed up and restored a collection to a newly installed TFS 2013 Preview so that I can configure the process template (Upgrading to Visual Studio Scrum 3.0 process template in TFS 2013) to take advantage of the new features in 2013 and test that before moving/upgrading the production server.

Quick Fix

As a quick fix you can

  1. Close Visual Studio and related apps
  2. Browse to %LocalAppData%\Microsoft\Team Foundation\5.0\Cache and delete all the contents of that folder

This isn’t ideal as you will need to do this for each client and every time you switch between the 2.

Better Fix

As a better and more user friendly fix, you can

  1. Do the Quick Fix
  2. TS to the server where you have The new TFS server with a copy of your collection attached (my TFS 2013 instance)
  3. Open a command line window in Administrator mode
  4. Run cd "C:\Program Files\Microsoft Team Foundation Server 12.0\Tools"
  5. Run tfsconfig ChangeServerID /sqlinstance:<Your Sql Instance Name> /databasename:<Your configuration Database Name> /ProjectCollectionsOnly
  6. This should bring up a message that says "The command ChangeServerId should only be run against a set of Team Foundation Server databases that have no application tiers configured. Do you want to continue with this operation? (Yes/No)"
  7. Type Yes and hit enter

Now you should be fine to use both instances of TFS with the same collection name without issues