TfsDeployerBuildData - breaking change in v1.4

Mar 22, 2011 at 5:54 AM

The following breaking change is listed in 1.4.0.54837:

"The old TFS 2005 $TfsDeployerBuildData variable is no longer available to PowerShell deployment scripts."

I use "set-location $TfsDeployerBuildData.DropLocation" within my powershell deploy scripts - will I still have access to this property with v1.4?

Also, the Troubleshooting section of installation instructions still has as an example "$buildNumber = $TfsDeployerBuildData.BuildNumber".  Is this still valid for v1.4?

Just trying to understand the effects of the upgrade before going ahead with it.

Coordinator
Mar 22, 2011 at 7:25 AM

Hi,

The TFS 2008/2010 $TfsDeployerBuildDetail variable is now available instead (note the "Detail" vs "Data" suffix). This variable contains an object that looks very much like this TFS 2010 API class:
http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.build.client.ibuilddetail.aspx
It has a DropLocation property that should behave the same as the property you have been using. I have updated the Troubleshooting section to match.

As a completely separate note, I would recommend against using Set-Location in your scripts, partly due to the issue discussed here:
http://www.leeholmes.com/blog/2006/07/18/set-location-and-environmentcurrentdirectory/
Instead, build absolute paths (eg using Join-Path) to pass to any cmdlets, .NET functions, or executables.

Regards,

Jason

May 3, 2011 at 7:17 AM

Thanks Jason,

Upgrade from v1.2 to v1.4 was a success!

The upgrade has solved a problem we had with duplicate deployments which were causing failures due to simultateous file delete/copy processes and db deadlocks - cheers uglybugger for the fix: http://tfsdeployer.codeplex.com/SourceControl/changeset/changes/51232 

Thanks also for the heads up on the set-location.

-Sarah.