2008-09-23 17 views

Odpowiedz

23

Spróbuj dodać ten wewnątrz PropertyGroup w TFSBuild.proj:

<SkipWorkItemCreation>true</SkipWorkItemCreation> 

Jeśli jesteś ciekaw, jak to działa, Microsoft.TeamFoundation.Build.targets contians następujące:

<Target Name="CoreCreateWorkItem" 
      Condition=" '$(SkipWorkItemCreation)'!='true' and '$(IsDesktopBuild)'!='true' " 
      DependsOnTargets="$(CoreCreateWorkItemDependsOn)"> 

    <PropertyGroup> 
     <WorkItemTitle>$(WorkItemTitle) $(BuildNumber)</WorkItemTitle> 
     <BuildLogText>$(BuildlogText) &lt;a href='file:///$(DropLocation)\$(BuildNumber)\BuildLog.txt'&gt;$(DropLocation)\$(BuildNumber)\BuildLog.txt&lt;/a &gt;.</BuildLogText> 
     <ErrorWarningLogText Condition="!Exists('$(MSBuildProjectDirectory)\ErrorsWarningsLog.txt')"></ErrorWarningLogText> 
     <ErrorWarningLogText Condition="Exists('$(MSBuildProjectDirectory)\ErrorsWarningsLog.txt')">$(ErrorWarningLogText) &lt;a href='file:///$(DropLocation)\$(BuildNumber)\ErrorsWarningsLog.txt'&gt;$(DropLocation)\$(BuildNumber)\ErrorsWarningsLog.txt&lt;/a &gt;.</ErrorWarningLogText> 
     <WorkItemDescription>$(DescriptionText) %3CBR%2F%3E $(BuildlogText) %3CBR%2F%3E $(ErrorWarningLogText)</WorkItemDescription> 
    </PropertyGroup> 

    <CreateNewWorkItem 
      TeamFoundationServerUrl="$(TeamFoundationServerUrl)" 
      BuildUri="$(BuildUri)" 
      BuildNumber="$(BuildNumber)" 
      Description="$(WorkItemDescription)" 
      TeamProject="$(TeamProject)" 
      Title="$(WorkItemTitle)" 
      WorkItemFieldValues="$(WorkItemFieldValues)" 
      WorkItemType="$(WorkItemType)" 
      ContinueOnError="true" /> 

    </Target> 

Można zastąpić dowolną z tych funkcji w swoim własnym skrypcie budowania, ale Microsoft udostępnia na górze przydatny warunek SkipWorkItemCreation, którego można użyć do anulowania wykonania Cały cel.