Este es el patrón que normalmente se utiliza para agregar pasos para el informe de compilación en TFS 2008. (Ver http://code.msdn.microsoft.com/buildwallboard/ para el ejemplo completo que yo suelo usar en mi equipo Construir conversaciones)
Básicamente, la magia es que hay una tarea personalizada provista en TFS2008 llamada "BuildStep". Aquí es la sección donde el genero y el instalador MSI y construir los pasos de generación apropiadas en el informe:
<Target Name="PackageBinaries">
<!-- create the build step -->
<BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
BuildUri="$(BuildUri)"
Message="Creating Installer"
Condition=" '$(IsDesktopBuild)' != 'true' " >
<Output TaskParameter="Id"
PropertyName="InstallerStepId" />
</BuildStep>
<!-- Create the MSI file using WiX -->
<MSBuild Projects="$(SolutionRoot)\SetupProject\wallboard.wixproj"
Properties="BinariesSource=$(OutDir);PublishDir=$(BinariesRoot);Configuration=%(ConfigurationToBuild.FlavourToBuild)" >
</MSBuild>
<!-- If we sucessfully built the installer, tell TFS -->
<BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
BuildUri="$(BuildUri)"
Id="$(InstallerStepId)"
Status="Succeeded"
Condition=" '$(IsDesktopBuild)' != 'true' " />
<!-- Note that the condition above means that we do not talk to TFS when doing a Desktop Build -->
<!-- If we error during this step, then tell TFS we failed-->
<OnError ExecuteTargets="MarkInstallerFailed" />
</Target>
<Target Name="MarkInstallerFailed">
<!-- Called by the PackageBinaries method if creating the installer fails -->
<BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
BuildUri="$(BuildUri)"
Id="$(InstallerStepId)"
Status="Failed"
Condition=" '$(IsDesktopBuild)' != 'true' " />
</Target>
Así que al principio, que crean el paso de generación y guardar el ID del paso en un hotel fenomenal llamado InstallerStepId. Después de haber realizado mi tarea, establecí el estado de ese paso en Exitoso. Si ocurre algún error durante el paso, establezco el estado de ese paso en Fallido.
Buena suerte,
Martin.
Eso es EXACLTY it! ¡¡¡¡Gracias!!!! –
Acabo de probarlo. Funciona muy bien. ¡Gracias! –