Skip to content

Instantly share code, notes, and snippets.

@kiyokura
Created August 27, 2012 09:33
Show Gist options
  • Save kiyokura/3486952 to your computer and use it in GitHub Desktop.
Save kiyokura/3486952 to your computer and use it in GitHub Desktop.
カスタムタスクを実行するビルドテンプレートの例
<!-- プロジェクトがチェックアウトされていないか確認するタスク -->
<UsingTask TaskName="CheckedInDoneTask"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<TfsCollectionUrl ParameterType="System.String" Required="true" />
<TfsTargetSourceFolder ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="Microsoft.TeamFoundation.Client" />
<Reference Include="Microsoft.TeamFoundation.VersionControl.Client" />
<Code Type="Class" Language="cs" Source="..\CheckedInDoneTask.cs" />
</Task>
</UsingTask>
<Target Name="PreBuild" >
<!-- チェックアウトが無いか確認 -->
<CheckedInDoneTask TfsCollectionUrl="$(TfsCollectionUrl)"
TfsTargetSourceFolder="$(TfsTargetSourceFolder)">
</CheckedInDoneTask>
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment