Using the TFS source control provider in CCNET v1.5 with 2010

Recently I helped a client of Falafel’s get up and running with Continuous Integration using CCNET v1.5. They’re running Team Foundation Server 2010 using TFS for their source repository and fortunately CruiseControl.NET includes a source control provider for TFS. Having tried this configuration and successfully we configured the server but ran into the following error:

Source control failure (GetModifications): Unable to find TF.exe and it was not defined in Executable Parameter

TFSError

Reviewing the code for the TFS plugin we can see why this happens for 2010:

private string ReadTFFromRegistry()
{
    string registryValue = null;

    registryValue = registry.GetLocalMachineSubKeyValue(VS2008_64_REGISTRY_PATH, VS_REGISTRY_KEY);

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2005_64_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2008_32_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2005_32_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        Log.Debug("Unable to find TF.exe and it was not defined in Executable Parameter");
        throw new Exception("Unable to find TF.exe and it was not defined in Executable Parameter");
    }

    return Path.Combine(registryValue, TF_EXE);
}

As of this writing the CCNET documentation does not include the Executable parameter for this source control provider though the fix is easy enough.

CC BY-NC-SA 4.0
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Published by

Steve

Husband, father, brother, software developer. CTO @WanderfulMedia

2 thoughts on “Using the TFS source control provider in CCNET v1.5 with 2010”

  1. So what is the fix? How can I get this to work with the right team project under the right collection?

Comments are closed.