code_junkie

How can we display a “step” inside Visual Studio build process?

Nov 11th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <Target Name="PackageBinaries">
  2.  
  3. <!-- create the build step -->
  4. <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
  5. BuildUri="$(BuildUri)"
  6. Message="Creating Installer"
  7. Condition=" '$(IsDesktopBuild)' != 'true' " >
  8. <Output TaskParameter="Id"
  9. PropertyName="InstallerStepId" />
  10. </BuildStep>
  11.  
  12. <!-- Create the MSI file using WiX -->
  13. <MSBuild Projects="$(SolutionRoot)SetupProjectwallboard.wixproj"
  14. Properties="BinariesSource=$(OutDir);PublishDir=$(BinariesRoot);Configuration=%(ConfigurationToBuild.FlavourToBuild)" >
  15. </MSBuild>
  16.  
  17. <!-- If we sucessfully built the installer, tell TFS -->
  18. <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
  19. BuildUri="$(BuildUri)"
  20. Id="$(InstallerStepId)"
  21. Status="Succeeded"
  22. Condition=" '$(IsDesktopBuild)' != 'true' " />
  23.  
  24. <!-- Note that the condition above means that we do not talk to TFS when doing a Desktop Build -->
  25.  
  26. <!-- If we error during this step, then tell TFS we failed-->
  27. <OnError ExecuteTargets="MarkInstallerFailed" />
  28. </Target>
  29.  
  30. <Target Name="MarkInstallerFailed">
  31. <!-- Called by the PackageBinaries method if creating the installer fails -->
  32. <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
  33. BuildUri="$(BuildUri)"
  34. Id="$(InstallerStepId)"
  35. Status="Failed"
  36. Condition=" '$(IsDesktopBuild)' != 'true' " />
  37. </Target>
Add Comment
Please, Sign In to add comment