TFS 2008のビルドは、プロジェクト内のすべてのAssemblyInfo.csファイルをチェックアウトし、AssemblyInfoTaskで更新してから、ビルドが成功したかどうかに応じて、チェックアウトまたはチェックインを元に戻すように設定されています。残念ながら、2つのビルドが互いに接近してキューに入れられると、AssemblyInfo.csファイルが以前のチェックインよりも前のバージョンでチェックアウトされているように見えるため、ビルドが部分的に完了します。
これを回避するために、「Get」タスクを使用して、AssemblyInfo.csファイルを更新する前に強制的に最新バージョンにすることができると思いましたが、これは効果がないようです。何か案は?
<Target Name="AfterGet" Condition="'$(IsDesktopBuild)'!='true'">
<Message Text="SolutionRoot = $(SolutionRoot)" />
<Message Text="OutDir = $(OutDir)" />
<!-- Set the AssemblyInfoFiles items dynamically -->
<CreateItem Include="$(SolutionRoot)\Main\Source\InputApplicationSln\**\$(AssemblyInfoSpec)">
<Output ItemName="AssemblyInfoFiles" TaskParameter="Include" />
</CreateItem>
<Message Text="$(AssemblyInfoFiles)" />
<!-- When builds are queued up successively, it is possible for the next build to be set up before the AssemblyInfoSpec is checked in so we need to force
the latest these versions of these files to be got before a checkout -->
<Get Condition=" '$(SkipGet)'!='true' " TeamFoundationServerUrl="$(TeamFoundationServerUrl)" Workspace="$(WorkspaceName)" Filespec="$(AssemblyInfoSpec)" Recursive="$(RecursiveGet)" Force="$(ForceGet)" />
<Exec WorkingDirectory="$(SolutionRoot)\Main\Source\InputApplicationSln"
Command="$(TF) checkout /recursive $(AssemblyInfoSpec)"/>