Home > MSBuild > Точки расширения MSBuild’а

Точки расширения MSBuild’а

При создании автоматизированых билдов с помощью MSBuild очень важно точно понимать что за чем происходит и в какой момент можно вмешаться. Я например очень долго провозился, пытаясь заставить мои задачи копирования “увидеть” скомпилированные файлы из папки билда (DropLocation). В итоге оказалось, что копировать я пытаюсь после компиляции, но до выполнения цели DropBuild, поэтому файлов в целевой папке еще нет.

Итак, точки расширения в порядке выполнения целей MSBuild’ом:

<!-- Override this target to execute custom tasks before EndToEndIteration -->
  <Target Name="BeforeEndToEndIteration" />

  <!--
       Override this target to execute a task for customizing the build number and/or drop location.
       Make sure that the task outputs properties with the names 'BuildNumber' and/or 'DropLocation'.
    -->
  <Target Name="BuildNumberOverrideTarget" />

  <!--
       Override this target to execute a task for customizing the build number and/or drop location.
       Make sure that the task outputs properties with the names 'BuildNumber' and/or 'DropLocation'.
    -->
  <Target Name="BuildNumberOverrideTarget" />

  <!-- Override this target to execute custom tasks before clean -->
  <Target Name="BeforeClean" />

  <!-- Override this target to execute custom tasks after clean -->
  <Target Name="AfterClean" />

  <Target Name="BeforeCleanConfiguration" />
  <Target Name="AfterCleanConfiguration" />

  <!-- Override this target to execute custom tasks before cleaning an individual solution -->
  <Target Name="BeforeCleanSolution" />

  <!-- Override this target to execute custom tasks after cleaning an individual solution -->
  <Target Name="AfterCleanSolution" />

  <!-- Override this target to execute custom tasks before workspace initialization -->
  <Target Name="BeforeInitializeWorkspace" />

  <!-- Override this target to execute custom tasks after workspace initialization  -->
  <Target Name="AfterInitializeWorkspace" />

  <!-- Override this target to execute custom tasks before getting sources -->
  <Target Name="BeforeGet" />

  <!-- Override this target to execute custom tasks after getting sources -->
  <Target Name="AfterGet" />

  <!-- Override this target to execute custom tasks before labeling sources -->
  <Target Name="BeforeLabel" />

  <!-- Override this target to execute custom tasks after labeling sources -->
  <Target Name="AfterLabel" />

  <!-- Override this target to execute custom tasks before compilation -->
  <Target Name="BeforeCompile" />

  <!-- Override this target to execute custom tasks after compilation -->
  <Target Name="AfterCompile" />

  <!-- Override this target to execute custom tasks before the compilation of an individual configuration -->
  <Target Name="BeforeCompileConfiguration" />

  <!-- Override this target to execute custom tasks after the compilation of an individual configuration -->
  <Target Name="AfterCompileConfiguration" />

  <!-- Override this target to execute custom tasks before the compilation of an individual solution -->
  <Target Name="BeforeCompileSolution" />

  <!-- Override this target to execute custom tasks after the compilation of an individual solution -->
  <Target Name="AfterCompileSolution" />

  <!-- Override this target to execute custom tasks before associating changesets and updating work items -->
  <Target Name="BeforeGetChangesetsAndUpdateWorkItems" />

  <!-- Override this target to execute custom tasks after associating changesets and updating work items -->
  <Target Name="AfterGetChangesetsAndUpdateWorkItems" />

  <!-- Override this target to execute custom tasks before running tests -->
  <Target Name="BeforeTest" />

  <!-- Override this target to execute custom tasks after running tests -->
  <Target Name="AfterTest" />

  <!-- Override this target to execute custom tasks before the testing of an individual configuration -->
  <Target Name="BeforeTestConfiguration" />

 <!-- Override this target to execute custom tasks after the testing of an individual configuration -->
  <Target Name="AfterTestConfiguration" />

  <!-- Override this target to generate documentation. -->
  <Target Name="GenerateDocumentation" />

  <!-- Override this target to package all binaries for deployment. -->
  <Target Name="PackageBinaries" />

  <!-- Override this target to execute custom tasks before copying files to the drop location -->
  <Target Name="BeforeDropBuild" />

  <!-- Override this target to execute custom tasks after copying files to the drop location -->
  <Target Name="AfterDropBuild" />

  <!-- Override this target to execute custom tasks before the BuildBreak target -->
  <Target Name="BeforeOnBuildBreak" />

  <!-- Override the target to execute custom tasks after associating changesets on a build break -->
  <Target Name="AfterGetChangesetsOnBuildBreak" />

  <!-- Override the target to execute custom tasks before associating changesets on a build break -->
  <Target Name="BeforeGetChangesetsOnBuildBreak" />

  <!-- Override the target to execute custom tasks after associating changesets on a build break -->
  <Target Name="AfterGetChangesetsOnBuildBreak" />

  <!-- Override this target to execute custom tasks before work item creation -->
  <Target Name="BeforeCreateWorkItem" />

  <!-- Override this target to execute custom tasks after work item creation-->
  <Target Name="AfterCreateWorkItem" />

 Взято отсюда, спасибо Derek Liang!

Удачных билдов 😉

Advertisements
Categories: MSBuild Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: