Showing posts with label tfs. Show all posts
Showing posts with label tfs. Show all posts

Friday, 27 April 2012

How to change smtp server in TFS2008

Team Foundation Server 2008 is not the most user-friendly application to configure. Here is how to change the smtp server it is using for alerts and other outgoing emails

It is done by changing standard .Net smtp configuration section in the following files, change the host attribute on smtp/network node:

C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services\web.config
C:\Program Files\Microsoft Visual Studio 2008 Team System Web Access\Web\web.config

<configuration>...  <system.net>    <mailSettings>      <smtp deliveryMethod="network" from="teamserver@mydomain.net">        <network host="my.mail.server" port="25" defaultCredentials="true" />      </smtp>    </mailSettings>  </system.net>

Tuesday, 27 March 2012

Using WinMerge in VS2010

My recommended tool for Compare and Merge operation in Visual Studio is WinMerge

Here is how to setup Visual Studio 2010 IDE to use it. Assuming you are using Team foundation Server and WinMerge is already installed


In IDE:
Tools->Options
Expand "Source Control"
Click "Visual Studio Team Foundation Server" link
Click "configure User Tools ..." button

click "Modify ..." for each extension
or click "Add ..." to add new one

You may add .* as an extension which will mean any file extension

Compare:
Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
Arguments: /e /u /wl /wr /dl %6 /dr %7 %1 %2

Merge:
Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
Arguments: /e /u /wl /dl %6 /dr %7 %1 %2 %4



Tuesday, 17 January 2012

Exporting TFS work item(s) (Scenarios, QoS) to Word

Approach 1) Use the TeamSpec - commercial tool

Approach 2) AIT Word2TFS - Free tool but works only with TFS2010

Approach 3) Run a report in SSRS, deliver it as Word

Approach 4) Wait for ALM Rangers to release their Word4TFS tool here

Approach 5) use TFS Power Tools and xslt

1. Download and Install TFS Power Tools (Team Foundation Server 2010 Power Tools)
2. Download MSXSL utility msxsl.exe  or use your own xslt transformer
3. Run the query like below for Scenarios:
tfpt query /collection:http://myserver:8080 /format:xml /wiql:"SELECT * FROM WorkItems WHERE [System.TeamProject] = 'MyProject' AND [System.WorkItemType] = 'Scenario' AND [System.IterationPath] = 'MyProject\MyIteration' ORDER BY [System.Id]" > WorkItems.xml
4. Learn the xml reference schema for Microsoft Office 2003 or Microsoft Office 2007. Transform your xml with xslt

if you use that msxsl.exe then the command line is: msxsl.exe WorkItems.xml tfs2word.xslt -o myitems.xml

Updated: Now the xslt can transform line breaks and generate simple Table of Contents (TOC)

xslt to use:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
 <xsl:output method="xml" indent="yes" />
 <xsl:template match="/">
  <xsl:processing-instruction name="mso-application">
   <xsl:text>progid="Word.Document"</xsl:text>
  </xsl:processing-instruction>
<w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
    xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word"
    xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
    xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2"
    xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no"
    w:ocxPresent="no" xml:space="preserve">
    <o:DocumentProperties>
        <o:Author>AngledOnTech.blogspot.com</o:Author>
    </o:DocumentProperties>
  <w:docPr>
        <w:view w:val="print" />
     </w:docPr>
    <w:fonts>
        <w:defaultFonts w:ascii="Times New Roman" w:fareast="Times New Roman" w:h-ansi="Times New Roman" w:cs="Times New Roman"/>
        <w:font w:name="Times New Roman">
            <w:panose-1 w:val="02020603050405020304"/><w:charset w:val="00"/><w:family w:val="Roman"/><w:pitch w:val="variable"/><w:sig w:usb-0="E0002AFF" w:usb-1="C0007841" w:usb-2="00000009" w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000"/>
        </w:font>
        <w:font w:name="Cambria Math">
            <w:panose-1 w:val="02040503050406030204"/><w:charset w:val="01"/><w:family w:val="Roman"/><w:notTrueType/><w:pitch w:val="variable"/><w:sig w:usb-0="00000000" w:usb-1="00000000" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="00000000" w:csb-1="00000000"/></w:font><w:font w:name="Cambria"><w:panose-1 w:val="02040503050406030204"/><w:charset w:val="00"/><w:family w:val="Roman"/><w:pitch w:val="variable"/><w:sig w:usb-0="E00002FF" w:usb-1="400004FF" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="0000019F" w:csb-1="00000000"/>
        </w:font>
    </w:fonts>
    <w:styles>
        <w:versionOfBuiltInStylenames w:val="7"/>
        <w:latentStyles w:defLockedState="off" w:latentStyleCount="267">
            <w:lsdException w:name="Normal"/>
            <w:lsdException w:name="heading 1"/><w:lsdException w:name="heading 2"/><w:lsdException w:name="heading 3"/><w:lsdException w:name="heading 4"/><w:lsdException w:name="heading 5"/><w:lsdException w:name="heading 6"/><w:lsdException w:name="heading 7"/><w:lsdException w:name="heading 8"/><w:lsdException w:name="heading 9"/>
            <w:lsdException w:name="toc 1"/><w:lsdException w:name="toc 2"/><w:lsdException w:name="toc 3"/><w:lsdException w:name="toc 4"/><w:lsdException w:name="toc 5"/><w:lsdException w:name="toc 6"/><w:lsdException w:name="toc 7"/><w:lsdException w:name="toc 8"/><w:lsdException w:name="toc 9"/>
            <w:lsdException w:name="caption"/><w:lsdException w:name="Title"/><w:lsdException w:name="Default Paragraph Font"/>
            <w:lsdException w:name="Subtitle"/><w:lsdException w:name="Strong"/><w:lsdException w:name="Emphasis"/>
            <w:lsdException w:name="Table Grid"/><w:lsdException w:name="Placeholder Text"/><w:lsdException w:name="No Spacing"/>
            <w:lsdException w:name="Light Shading"/><w:lsdException w:name="Light List"/><w:lsdException w:name="Light Grid"/>
            <w:lsdException w:name="Medium Shading 1"/><w:lsdException w:name="Medium Shading 2"/><w:lsdException w:name="Medium List 1"/><w:lsdException w:name="Medium List 2"/><w:lsdException w:name="Medium Grid 1"/><w:lsdException w:name="Medium Grid 2"/><w:lsdException w:name="Medium Grid 3"/><w:lsdException w:name="Dark List"/><w:lsdException w:name="Colorful Shading"/><w:lsdException w:name="Colorful List"/><w:lsdException w:name="Colorful Grid"/><w:lsdException w:name="Light Shading Accent 1"/><w:lsdException w:name="Light List Accent 1"/><w:lsdException w:name="Light Grid Accent 1"/><w:lsdException w:name="Medium Shading 1 Accent 1"/><w:lsdException w:name="Medium Shading 2 Accent 1"/><w:lsdException w:name="Medium List 1 Accent 1"/><w:lsdException w:name="Revision"/><w:lsdException w:name="List Paragraph"/><w:lsdException w:name="Quote"/><w:lsdException w:name="Intense Quote"/><w:lsdException w:name="Medium List 2 Accent 1"/><w:lsdException w:name="Medium Grid 1 Accent 1"/><w:lsdException w:name="Medium Grid 2 Accent 1"/><w:lsdException w:name="Medium Grid 3 Accent 1"/><w:lsdException w:name="Dark List Accent 1"/><w:lsdException w:name="Colorful Shading Accent 1"/><w:lsdException w:name="Colorful List Accent 1"/><w:lsdException w:name="Colorful Grid Accent 1"/><w:lsdException w:name="Light Shading Accent 2"/><w:lsdException w:name="Light List Accent 2"/><w:lsdException w:name="Light Grid Accent 2"/><w:lsdException w:name="Medium Shading 1 Accent 2"/><w:lsdException w:name="Medium Shading 2 Accent 2"/><w:lsdException w:name="Medium List 1 Accent 2"/><w:lsdException w:name="Medium List 2 Accent 2"/><w:lsdException w:name="Medium Grid 1 Accent 2"/><w:lsdException w:name="Medium Grid 2 Accent 2"/><w:lsdException w:name="Medium Grid 3 Accent 2"/><w:lsdException w:name="Dark List Accent 2"/><w:lsdException w:name="Colorful Shading Accent 2"/><w:lsdException w:name="Colorful List Accent 2"/><w:lsdException w:name="Colorful Grid Accent 2"/><w:lsdException w:name="Light Shading Accent 3"/><w:lsdException w:name="Light List Accent 3"/><w:lsdException w:name="Light Grid Accent 3"/><w:lsdException w:name="Medium Shading 1 Accent 3"/><w:lsdException w:name="Medium Shading 2 Accent 3"/><w:lsdException w:name="Medium List 1 Accent 3"/><w:lsdException w:name="Medium List 2 Accent 3"/><w:lsdException w:name="Medium Grid 1 Accent 3"/><w:lsdException w:name="Medium Grid 2 Accent 3"/><w:lsdException w:name="Medium Grid 3 Accent 3"/><w:lsdException w:name="Dark List Accent 3"/><w:lsdException w:name="Colorful Shading Accent 3"/><w:lsdException w:name="Colorful List Accent 3"/><w:lsdException w:name="Colorful Grid Accent 3"/><w:lsdException w:name="Light Shading Accent 4"/><w:lsdException w:name="Light List Accent 4"/><w:lsdException w:name="Light Grid Accent 4"/><w:lsdException w:name="Medium Shading 1 Accent 4"/><w:lsdException w:name="Medium Shading 2 Accent 4"/><w:lsdException w:name="Medium List 1 Accent 4"/><w:lsdException w:name="Medium List 2 Accent 4"/><w:lsdException w:name="Medium Grid 1 Accent 4"/><w:lsdException w:name="Medium Grid 2 Accent 4"/><w:lsdException w:name="Medium Grid 3 Accent 4"/><w:lsdException w:name="Dark List Accent 4"/><w:lsdException w:name="Colorful Shading Accent 4"/><w:lsdException w:name="Colorful List Accent 4"/><w:lsdException w:name="Colorful Grid Accent 4"/><w:lsdException w:name="Light Shading Accent 5"/><w:lsdException w:name="Light List Accent 5"/><w:lsdException w:name="Light Grid Accent 5"/><w:lsdException w:name="Medium Shading 1 Accent 5"/><w:lsdException w:name="Medium Shading 2 Accent 5"/><w:lsdException w:name="Medium List 1 Accent 5"/><w:lsdException w:name="Medium List 2 Accent 5"/><w:lsdException w:name="Medium Grid 1 Accent 5"/><w:lsdException w:name="Medium Grid 2 Accent 5"/><w:lsdException w:name="Medium Grid 3 Accent 5"/><w:lsdException w:name="Dark List Accent 5"/><w:lsdException w:name="Colorful Shading Accent 5"/><w:lsdException w:name="Colorful List Accent 5"/><w:lsdException w:name="Colorful Grid Accent 5"/><w:lsdException w:name="Light Shading Accent 6"/><w:lsdException w:name="Light List Accent 6"/><w:lsdException w:name="Light Grid Accent 6"/><w:lsdException w:name="Medium Shading 1 Accent 6"/><w:lsdException w:name="Medium Shading 2 Accent 6"/><w:lsdException w:name="Medium List 1 Accent 6"/><w:lsdException w:name="Medium List 2 Accent 6"/><w:lsdException w:name="Medium Grid 1 Accent 6"/><w:lsdException w:name="Medium Grid 2 Accent 6"/><w:lsdException w:name="Medium Grid 3 Accent 6"/><w:lsdException w:name="Dark List Accent 6"/><w:lsdException w:name="Colorful Shading Accent 6"/><w:lsdException w:name="Colorful List Accent 6"/><w:lsdException w:name="Colorful Grid Accent 6"/><w:lsdException w:name="Subtle Emphasis"/><w:lsdException w:name="Intense Emphasis"/><w:lsdException w:name="Subtle Reference"/><w:lsdException w:name="Intense Reference"/><w:lsdException w:name="Book Title"/><w:lsdException w:name="Bibliography"/><w:lsdException w:name="TOC Heading"/></w:latentStyles><w:style w:type="paragraph" w:default="on" w:styleId="Normal"><w:name w:val="Normal"/><w:rPr><wx:font wx:val="Times New Roman"/><w:lang w:val="EN-GB" w:fareast="EN-GB" w:bidi="AR-SA"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading2"><w:name w:val="heading 2"/><wx:uiName wx:val="Heading 2"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading2Char"/><w:rsid w:val="002E2428"/><w:pPr><w:keepNext/><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="1"/></w:pPr><w:rPr><w:rFonts w:ascii="Cambria" w:h-ansi="Cambria"/><wx:font wx:val="Cambria"/><w:b/><w:b-cs/><w:i/><w:i-cs/><w:sz w:val="28"/><w:sz-cs w:val="28"/></w:rPr></w:style><w:style w:type="character" w:default="on" w:styleId="DefaultParagraphFont"><w:name w:val="Default Paragraph Font"/></w:style><w:style w:type="table" w:default="on" w:styleId="TableNormal"><w:name w:val="Normal Table"/><wx:uiName wx:val="Table Normal"/><w:rPr><wx:font wx:val="Times New Roman"/><w:lang w:val="EN-GB" w:fareast="EN-GB" w:bidi="AR-SA"/></w:rPr><w:tblPr><w:tblInd w:w="0" w:type="dxa"/><w:tblCellMar><w:top w:w="0" w:type="dxa"/><w:left w:w="108" w:type="dxa"/><w:bottom w:w="0" w:type="dxa"/><w:right w:w="108" w:type="dxa"/></w:tblCellMar></w:tblPr></w:style><w:style w:type="list" w:default="on" w:styleId="NoList"><w:name w:val="No List"/></w:style><w:style w:type="character" w:styleId="Heading2Char"><w:name w:val="Heading 2 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading2"/><w:rsid w:val="002E2428"/><w:rPr><w:rFonts w:ascii="Cambria" w:fareast="Times New Roman" w:h-ansi="Cambria" w:cs="Times New Roman"/><w:b/><w:b-cs/><w:i/><w:i-cs/><w:sz w:val="28"/><w:sz-cs w:val="28"/></w:rPr>
            </w:style>
    </w:styles>   
   <w:body>
    <w:tbl>
     <w:tblPr>
      <w:tblStyle w:val="TableGrid"/>
      <w:tblW w:w="0" w:type="auto"/>
      <w:tblLook w:val="01E0"/>
     </w:tblPr>
     <w:tblGrid>
      <w:gridCol w:w="4428"/><w:gridCol w:w="4428"/>
     </w:tblGrid>
     <w:tr>
        <w:tc><w:p><w:r><w:t>ID</w:t></w:r></w:p></w:tc>
        <w:tc><w:p><w:r><w:t>Title</w:t></w:r></w:p></w:tc>
     </w:tr>
     <xsl:apply-templates select="WorkItems/WorkItem" mode="toc"/>
    </w:tbl>   
    <w:br w:type="page"/>
   
     <xsl:apply-templates select="WorkItems/WorkItem" />
   
   </w:body>
  </w:wordDocument>
 </xsl:template>

<xsl:template match="WorkItems/WorkItem" mode="toc">
  <w:tr>
   <w:tc><w:p><w:r><w:t><xsl:value-of select="Fields/Field[@RefName='System.Id']/@Value" /></w:t></w:r></w:p></w:tc>
   <w:tc><w:p><w:r><w:t><xsl:value-of select="Fields/Field[@RefName='System.Title']/@Value"/></w:t></w:r></w:p></w:tc>
  </w:tr>
</xsl:template>

 <xsl:template match="WorkItem">
    <w:p>
        <w:pPr>
            <w:pStyle w:val="Heading2"/>
            <w:keepLines w:val="on"/>
            <w:keepNext w:val="on"/>
        </w:pPr>
     <w:r>
      <w:t>
       <xsl:value-of select="Fields/Field[@RefName='System.Id']/@Value" />: <xsl:value-of select="Fields/Field[@RefName='System.Title']/@Value" />
      </w:t>
     </w:r>
    </w:p>
    <w:p>
       <w:pPr><w:keepLines w:val="on"/></w:pPr>   
     <w:r>
      <w:t>
        <xsl:call-template name="string-replace-with-mswordbreaks">
          <xsl:with-param name="text" select="Fields/Field[@RefName='System.Description']/@Value" />
          <xsl:with-param name="replace" select="'&#10;'" />
        </xsl:call-template>      
      </w:t>
     </w:r>
    </w:p>   
 </xsl:template>


 </xsl:stylesheet>


Useful links:
Good overview of WordprocessingML
Office 2003 reference schemas
Office 2007 Schema Reference


Friday, 30 September 2011

Team Build fails to find Microsoft.Web.Deployment when running Web Deployment target


While compiling perfectly fine on developer's local machine, Team Build for an ASP.Net project may fail on a build server with a failure to load Microsoft.Web.Deployment assembly



Possible Solution:
Download and install Web Deploy 2.0 Refresh for your platform. This version can coexist with previous, 1.1 version.


x86: http://go.microsoft.com/fwlink/?LinkId=209115
x64: http://go.microsoft.com/fwlink/?LinkId=209116


Error:

Target "CheckAndCleanMSDeployPackageIfNeeded" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets" from project ".....csproj" (target "GenerateMsdeployManifestFiles" depends on it):
Using "IsCleanMSDeployPackageNeeded" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll".
Task "IsCleanMSDeployPackageNeeded"
  Failed to load this version Microsoft.Web.Deployment (8.0) reason:Could not load file or assembly 'Microsoft.Web.Deployment, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..
   Trying the next one specified in $(_MSDeployVersionsToTry)..
  Failed to load this version Microsoft.Web.Deployment (7.5) reason:Could not load file or assembly 'Microsoft.Web.Deployment, Version=7.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..
   Trying the next one specified in $(_MSDeployVersionsToTry)..
  Failed to load this version Microsoft.Web.Deployment (7.1) reason:Could not load file or assembly 'Microsoft.Web.Deployment, Version=7.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..
   Trying the next one specified in $(_MSDeployVersionsToTry)..
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: The "IsCleanMSDeployPackageNeeded" task failed unexpectedly. [.......csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object. [......csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018:    at Microsoft.Web.Publishing.Tasks.Common.Utility.CheckMSDeploymentVersion() [......csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018:    at Microsoft.Web.Publishing.Tasks.Common.Utility.get_IsMSDeployInstalled() [......csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018:    at Microsoft.Web.Publishing.Tasks.Common.Utility.CheckMSDeploymentVersion(Task task) [.....csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018:    at Microsoft.Web.Publishing.Tasks.IsCleanMSDeployPackageNeeded.Execute() [.....csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [......csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2850,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) [......csproj]
Done executing task "IsCleanMSDeployPackageNeeded" -- FAILED.
Done building target "CheckAndCleanMSDeployPackageIfNeeded" in project ".....csproj" -- FAILED.
Done executing task "CallTarget" -- FAILED.






Monday, 26 September 2011

Team Build, fixing the "Unable to determine the workspace" error

When running the Team Build on Team Foundation Server 2008 you may get the following error in your build log (replaced file paths with dummy PATHTOMYFILE, etc):


Error:

Using "Exec" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Exec"
  "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\..\tf.exe" get /force /noprompt "PATHTOMYFILE"
  Unable to determine the workspace.
PATHTOBUILDFILE\BuildType\TFSBuild.proj(60,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\..\tf.exe" get /force /noprompt "PATHTOMYFILE"" exited with code 100.
Done executing task "Exec" -- FAILED.


Solution:
A) make sure you have a workspace mapping for your build computer and for the windows account under which team build agent runs
B) Remote desktop to your build server under the build account and run the following from the command line
@echo off

SET TFPATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\tf.exe
echo Listing the workspaces for %USERNAME%
"%TFPATH%" workspaces /s:http://BUILDSERVERNAME:8080 /owner:%USERNAME%


echo Press any key now to refresh workspaces or close the window to exit
pause


"%TFPATH%" workspaces /s:http://BUILDSERVERNAME:8080
echo Done!
pause






Wednesday, 21 September 2011

VS2008 SP1 may break the Team Foundation Build

Installed VS2008 SP1 on a build server where there was Team Build Agent installed. Started to receive the following error when running the build:


C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(300,15): error MSB4131: The "Reason" parameter is not supported by the "GetBuildProperties" task. Verify the parameter exists on the task, and it is a gettable public instance property.

The reason was that the Tasks assembly was not updated - it is located here:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.Tasks.dll along with some other dlls. For SP1, its version should be 9.0.30729.1, modified in 2008, while in my case it was some lower version.

The solution is to install Team Foundation Server 2008 SP1, which is 133 megs and can be downloaded from here: Team Foundation Server 2008 Service Pack 1 (SP1)