But it works on my PC!

The random thoughts of Richard Fennell on technology and software development

Notes from my session of the Visual Studio 2013 launch at NDC London

Thanks to anyone who came to my session ‘TFS is not just for Visual Studio users’ at the Visual Studio 2013 at NDC London yesterday. Hope you found it useful and are now thinking of TFS as a tool for heterogeneous teams, not just developers using Visual Studio. As I discussed there are many options:

  • Developers can work within their IDEs
    • Visual Studio 2008, 2010, 2012, 2013
    • Any IDE based on Eclipse
    • Any IDE using MSSCCI (VB6, VS2003, VS2005, MathLab, Enterprise Architect)
  • If not using an IDE can check code in and out  from
    • The command line (.NET and Java)
    • API (.NET and Java) and REST for your own third party developed tools (or from within PowerShell by loading the .NET API assemblies)
    • Windows Explorer Integration allows a checkin and out from Windows Explorer, great for graphics designer’s tools or IDEs with no source control integration
  • You can manage work items from
    • Within Microsoft Office, Excel and Project (2010-2013) – good for batch operations and general project manager activities.
    • But probably a web browsers will be the primary tool for most people, whether on a PC, Mac or tablet
  • Also if you are using a Git repository in your Team Project there are a while range of GIT clients for various platforms all of them will work

The links from my last slide of suggestions were

Announcing a CodePlex project that provides an IronPython DSL that can be used to define the handling of TFS Alerts

I have just published a new project to CodePlex http://tfsalertsdsl.codeplex.com/.

Microsoft Team Foundation Server (TFS) provides an alerting model where given a certain condition, such as a check-in, work item edit or build completion, an email can be sent to an interest party or a call made to a SOAP based web service. Using this SOAP model it is possible to provide any bespoke operations you wish that are triggered by a change on the TFS server.

This framework is designed to ease the development of these bespoke SOAP wen services by providing helper methods for common XML processing steps and API operations such as calling back to the TFS server or accessing SMTP services.

They main differentiator of this project is that it also provides a Python based DSL that allows the actual operation performed when the endpoint is called to be edited without the need to  to rebuild and redeploy the bespoke service. Operations are defined by script such as show below

For more details have a look at the project site, hope you find it useful

When your TFS Lab test agents can’t start check the DNS

Lab Management has a lot of moving parts, especially if you are using SCVMM based environments. All the parts have to communicate if the system is work.

One of the most common problem I have seen are due to DNS issues. A slowly propagating DNS can cause chaos as the test controller will not be able to resolve the name of the dynamically registered lab VMs.

The best fix is to sort out your DNS issues, but that is not always possible (some things just take the time they take, especially on large WANs).

An immediate fix is to use the local host files on the test controller to define IP address for the lab[guid].corp.domain names created when using network isolation. Once this is done the handshake between the controller and agent is usually possible.

If it isn’t then you are back to all the usually diagnostics tools

Building VMs for use in TFS Lab Management environments

We have recently gone through an exercise to provide a consistent set of prebuilt configured VMs for use in our TFS Lab Management environments.

This is not an insignificant piece of work as this post by Rik Hepworth discusses detailing all the IT pro work he had to do to create them. This is all before we even think about the work required to create deployment TFS builds and the like.

It is well worth a read if you are planning to provision a library of VM for Lab Management as it has some really useful tips and tricks

More on TF215106: Access denied from the TFS API after upgrade from 2012 to 2013

In my previous post I thought I had fixed my problems with TF215106 errors

"TF215106: Access denied. TYPHOONTFS\\TFSService needs Update build information permissions for build definition ClassLibrary1.Main.Manual in team project Scrum to perform the action. For more information, contact the Team Foundation Server administrator."}

Turns out I had not, acutally I not idea why it worked for a while! There could well be an API version issue, but I had to actually also missed I needed to do what the error message said!

If you check MSDN, it tells you how to check the permissions for a given build; on checking I saw that the update build information permission was not set for the build in question.

image

Once I set it for the domain account my service was running as, everything worked as expected.

All I can assume that there is a change from TSF 2012 to 2013 over defaulting the permission as I have not needed to set it explicitly in the past

TF215106: Access denied from the TFS API after upgrade from 2012 to 2013

Updated 6th Nov 2013 - Also see this updated post , the API mentioned here maybe an issue, but the rights change in this other post is probably the real issue

After upgrading a test server from TFS 2012 to 2013 I started getting the following exception when trying to set the retention for a build policy via the TFS API

"TF215106: Access denied. TYPHOONTFS\\TFSService needs Update build information permissions for build definition ClassLibrary1.Main.Manual in team project Scrum to perform the action. For more information, contact the Team Foundation Server administrator."}

This was a surprising error, the code had been working OK and the TFSService account is, well the service account, so has full rights.

The issue was I also needed to rebuild my application with the TFS 2013 API, once I rebuild with the 2013 DLLs it all worked fine.

Can I use the HP ALM Synchronizer with TF Service?

I recently tried to get the free HP ALM Synchronizer to link to Microsoft’s TF Service, the summary is it does not work. However, it took me a while to realise this.

The HP ALM Synchronizer was designed for TFS 2008/2010 so the first issue you hit is that TF Services is today basically TFS 2013 (and is a moving goal post as it is updated so often). This means when you try to configure the TFS connection in HP ALM Synchronizer  it fails because it cannot see any TFS client it supports. This is fairly simple to address, just install Visual Studio Team Explorer 2010 and patch it up to date so that it can connect to TF Service (you could go back to the 2008 and achieve the same if you really needed to)

Once you have a suitably old client you can progress to the point that it asks you for your TFS login credentials. HP ALM Synchronizer validates they are in the form DOMAIN\USER, this is a problem.

On TF Service you usually login with a LiveID, this is a non-starter in this case. However, you can configure alternative credentials, but these are in the form USER and PASSWORD. The string pattern verification on the credentials entry form in  HP ALM Synchronizer does not accept them, it must have a domain and slash. I could not find any pattern at satisfies both TF Service and the HP ALM Synchronizer setup tool. So basically you are stuck.

So for my client we ended up moving to a TFS 2013 Basic Install on premises and at all worked fine, they could sync HP QC defects into TFS using the HP ALM Synchronizer, so they were happy.

However, is there a better solution? One might be to a commercial product such as Tasktop Sync, this is designed to provide synchronisation services between a whole range of ALM like products. I need to find out if that supports TF Service as yet?

Get rid of that that zombie build

Whilst upgrading a TFS 2010 server to 2012 I had a problem that a build was showing in the queue as active after the upgrade. This build was queued in January, 10 months ago, so should have finished a long long time ago. This build had the effect that it blocked any newly queued builds, but the old build did not appear to be running on any agent – a zombie build.

I tried to stop it, delete it, everything I could think of, all to no effect. It would not go away.

In the end I had to use the brute force solution to delete the rows in the TPC’s SQL DB for the build. I did this in both the tbl_BuildQueue (use the QueueID) and tbl_Build (use the buildID) tables.