This project is read-only.

Changing Build Quality - still possible?

Feb 16, 2011 at 7:11 PM

I currently am running version in production w/ tfs 2010 RTM.

I have a deployment process that puts the code out in our dev environment, runs some UI tests and, if passes sets the build quality to "Ready for QA" to let QA know that it has passed through the quality gates.

I did that by having this in my script:

$TfsDeployerBuildDetail.Quality = "Ready for QA"


I have tested the latest version of TFS Deployer and it appears the Save method no longer exists in TFSDeployerBuildDetail and so the script fails.

Is there some other way to set the quality of the build?



Feb 16, 2011 at 7:14 PM

Hi there,

In TFS2010 they changed the object model, so I assume that is the reason that the capabilities of the object stored in $TfsDeployerBuildDetail changed. You'll probably need to load up the TFS API within the script to do this at the moment.

Feb 16, 2011 at 7:37 PM

Although its only the tfs deployer version thats changing. 2010 works fine w/

Feb 16, 2011 at 7:39 PM

In that case Jason might be trying to remove the direct dependency on TFS Deployer within the agent. I know he is trying to slowly change the architecture.

Feb 16, 2011 at 7:40 PM

If I could get the source for that release I could take a look at what changed and retrofit a fix but the latest release branch aside from trunk appears to be 1.1

Feb 17, 2011 at 8:41 AM

The way TFS Deployer exposes the build object model to scripts has changed for two reasons:

  • AppDomain isolation of deployment scripts required the objects to be serializable (or at least marshallable) so disconnected copies are all that are available to scripts now.
  • I am slowly reducing the coupling between Deployer and the TFS assemblies for reduce the install footprint required.

If your scripts need access to the live objects, they now need to talk to the TFS API directly. For example, to change the quality, I have written a sample PowerShell snippet here: (untested)

Finally, older versions of TFS Deployer had less than management of release source but performing a Get Specific Version or Branch of the Trunk from changeset 48385 should give you the source your version was built from.



Feb 17, 2011 at 2:09 PM

Thanks so much! I will give this a shot!

Feb 23, 2011 at 8:37 PM

It works! Thanks!

Aug 1, 2011 at 6:46 PM

Is there a good way to retrieve the Team Collection URI from the script? I'd hate to have to hard-code it. I'd also like to avoid having to customize the application by adding the URI as a parameter in the DeployAgent.

The value is already in the deployer's config file. Wonder if I could somehow find that and manually fetch the setting...

Thank you.

Aug 2, 2011 at 4:26 PM

I found a solution to my question. Added a "dir" to the script to verify the working directory when the script is run and discovered that it is running in the same folder as tfs deployer (and its config file).

function Get-Settings()


    [xml]$xml = Get-Content TfsDeployer.exe.config

    $node = $xml.configuration.SelectSingleNode("applicationSettings/TfsDeployer.Properties.Settings/setting[@name='TeamProjectCollectionUri']")

    set-variable -name tfsCollectionUri -value $node.value -scope Script

    "TFS Collection Uri: " + $tfsCollectionUri + " (from TfsDeployer.exe.config)"