This project is read-only.

GetLatest Error in MSBuild.ExtensionPack.Tfs.TeamBuild

Mar 7, 2011 at 8:39 PM


I am trying to use the MSBuild Extensions for getting latest from the TFS server and I am getting the error show below. Can someone please let me know what am I missing?

 <MSBuild.ExtensionPack.Tfs.TeamBuild TaskAction="GetLatest" TeamFoundationServerUrl="$(WorkspaceUrl)" TeamProject="$(GetFilespec)" BuildDefinitionName="DeveloplmentBuild">
<Output ItemName="BuildInfo" TaskParameter="Info" />

error : FileNotFoundException: Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Any help would be greatly appreciated...


Mar 7, 2011 at 9:27 PM

Hi, it's a know issue. See


Mar 8, 2011 at 9:41 PM

Thanks Mike!!!

After installing dlls in GAC I am not seeing that error.

Mar 8, 2011 at 9:49 PM


Is there one to one mapping to the attributes in the MSBuild get to Exxtention pack? Please advice

<Microsoft.TeamFoundation.Build.Tasks.Get TeamFoundationServerUrl="$(WorkspaceUrl)" Workspace="$(WorkspaceName)" Filespec="$(GetFilespec)" Recursive="$(RecursiveGet)" Force="$(ForceGet)" PopulateOutput="$(PopulateOutput)"> <Output ItemName="BuildInfo" TaskParameter="Gets" /> </Microsoft.TeamFoundation.Build.Tasks.Get>

<MSBuild.ExtensionPack.Tfs.TeamBuild TaskAction="GetLatest" TeamFoundationServerUrl="$(TeamFoundationServerUrl)" TeamProject="SpeedCMMI" BuildDefinitionName="DemoBuild">
            <Output ItemName="BuildInfo" TaskParameter="Info"/>
Feb 29, 2012 at 7:42 PM

Hi Mike. We have downloaded the Nov 11, 2011 build and still receiving this error. We also tried adding the reference assemblies to GAC but that did not help. Any assistance you can provide will be greatly appriciated. Thanks in advance.

Feb 29, 2012 at 7:46 PM

Can you confirm what version of the extension pack you are using and the exact message.





Feb 29, 2012 at 8:09 PM

Version: MSBuild Extension Pack from Nov 11, 2011 published download package
OS: Windows 2008 RC2
Import / Task:
  <Import Project="$(MSBuildExtensionsPath32)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks" Condition="$(IsAutoBuild)=='True'" />

 <!-- Get information on the latest build -->
 <MSBuild.ExtensionPack.Tfs.TeamBuild TaskAction="GetLatest" TeamFoundationServerUrl="$(TeamFoundationServerUrl)" TeamProject="$(TeamProject)" BuildDefinitionName="$(BuildDefinitionName)">
 <Output ItemName="BuildInfo" TaskParameter="Info"/>
Error Message: FileNotFoundException: Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

We know the import is working fine because we are able to use the following task without any problems:

<MSBuild.ExtensionPack.Framework.DateAndTime TaskAction="Get" Format="yyyyMMdd">
 <Output TaskParameter="Result" PropertyName="TodaysDate"/>

Mar 9, 2012 at 12:31 PM

Weird. And the version in the GAC is def Can you run fuslogvw during a build to see if there are any other binding errors.

your GAC should contain Microsoft.TeamFoundation.Client.dll and Microsoft.TeamFoundation.Build.Client.dll



Jul 3, 2012 at 3:07 PM
Edited Jul 3, 2012 at 4:23 PM

Get the same error message.
We got in GAC as we use Visual Studio 2010.

Is the extension pack forcible linked to instead of using the newest version available in the GAC?

Did some more testing...

Took files from another machine and copied onto mine and registered with gacutil (as mentioned above):
(=more files needed than available in AssemblyReferences due to inheritence) 

Tested with a TFS 2008 server and  everything worked well, but... we are primary using TFS 2010 servers why the binaries are to old:
error : TeamFoundationServiceUnavailableException: Team Foundation services are not available from the server.\rC:\ProjectsTFS\EandO\Main\EandO (BP Environment) Build Project - Test.proj(17,5): error : Technical information (for administrator):\rC:\ProjectsTFS\EandO\Main\EandO (BP Environment) Build Project - Test.proj(17,5): error :   TF253022: You must update your client with the Forward Compatibility Update in order to connect to the Team Foundation Server that you selected.To obtain this update, go to the Microsoft Web site:\rC:\ProjectsTFS\EandO\Main\EandO (BP Environment) Build Project - Test.proj(17,5): error : 

The message guides you to which is the download site for "Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer)". I don't have any machines of my own left with 2008 except for some build servers and I dont dare to apply the update to that server only to extract the updated dlls... it's getting hard now...

Pär Zebergs Brånedal 

Jul 3, 2012 at 4:59 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.