using the following code
<PropertyGroup>
<TeamFoundationServerUrl>http://SERVERNAME:8080/</TeamFoundationServerUrl>
</PropertyGroup>
<Target Name="Default">
<!-- Get information on the latest build -->
<MSBuild.ExtensionPack.Tfs.TeamBuild
TaskAction="GetLatest"
TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
TeamProject="PBE">
</MSBuild.ExtensionPack.Tfs.TeamBuild>
</Target>
I receive an exception
"D:\Work\common\BnD\vendor_ruby\nhsc-bnd\resources\msbuild\SourceCode.msbuild" (default target) (1) ->
(Default target) ->
D:\Work\common\BnD\vendor_ruby\nhsc-bnd\resources\msbuild\SourceCode.msbuild(15,9): error : MissingMethodException: Method not fo
und: 'Microsoft.TeamFoundation.Build.Client.BuildReason Microsoft.TeamFoundation.Build.Client.IBuildDetail.get_Reason()'.\r
D:\Work\common\BnD\vendor_ruby\nhsc-bnd\resources\msbuild\SourceCode.msbuild(15,9): error :
rendering the task unusable
Comments: ** Comment from web user: MikeARogers **
<PropertyGroup>
<TeamFoundationServerUrl>http://SERVERNAME:8080/</TeamFoundationServerUrl>
</PropertyGroup>
<Target Name="Default">
<!-- Get information on the latest build -->
<MSBuild.ExtensionPack.Tfs.TeamBuild
TaskAction="GetLatest"
TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
TeamProject="PBE">
</MSBuild.ExtensionPack.Tfs.TeamBuild>
</Target>
I receive an exception
"D:\Work\common\BnD\vendor_ruby\nhsc-bnd\resources\msbuild\SourceCode.msbuild" (default target) (1) ->
(Default target) ->
D:\Work\common\BnD\vendor_ruby\nhsc-bnd\resources\msbuild\SourceCode.msbuild(15,9): error : MissingMethodException: Method not fo
und: 'Microsoft.TeamFoundation.Build.Client.BuildReason Microsoft.TeamFoundation.Build.Client.IBuildDetail.get_Reason()'.\r
D:\Work\common\BnD\vendor_ruby\nhsc-bnd\resources\msbuild\SourceCode.msbuild(15,9): error :
rendering the task unusable
Comments: ** Comment from web user: MikeARogers **
I can say that I was getting this issue, it was frustrating, certainly at seeing the response. Having worked this through, the problem exists in the Microsoft.TeamFoundation.Build.Client file. I noticed a difference in the version on my build agent and also in the AssemblyReferences folder.
I upgraded my TFS Build Agent to SP1, and I am not getting the data from this method. My suggestion is to try this option, since there is VS2008 SP1 and there is TFS2008 SP1.
TFS2008 SP1
http://www.microsoft.com/en-us/download/details.aspx?id=6097
Would be curious to know what the result is.