This project is read-only.

Following code illustrates a way to refresh the document content using an msbuild project:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="">
  <UsingTask AssemblyFile="$(MSBuildProjectDirectory)\TestPlanWordWriter.Build.dll" TaskName="TestPlanWordWriter.Build.RefreshDocumentTask"></UsingTask>

  <Target Name="Build">
    <Message Text="Project File Directory = $(MSBuildProjectDirectory)" />
    <Message Text="CollectionUri = $(CollectionUri)" />
    <Message Text="TeamProject = $(TeamProject)" />
    <Message Text="OutDir = $(OutDir)" />

      SettingsFile="$(MSBuildProjectDirectory)\TestPlanWordSettings.xml" >


If you want to use this code in a Team Build 2010 build definition you could insert a MSBuild workflow activity in the build definition template and assign following value in CommandLineArguments property:

String.Format("/p:TeamProject=""{0}"" /p:CollectionUri=""{1}"" {2}", BuildDetail.TeamProject, Workspace.VersionControlServer.TeamProjectCollection.Uri.AbsoluteUri, MSBuildArguments)

In order to correctly execute this task you will need to export render settings using the add-in and copy the settings file in the same directory of the msbuild project file along with following dlls:

  • TestPlanWordWriter.Build.dll
  • TestPlanWordWriter.Common.dll
  • DocumentFormat.OpenXml.dll (OpenXml 2.0)

Last edited Apr 3, 2011 at 10:00 PM by luisj, version 12


No comments yet.