- Add an InvokeProcess activity to the workflow.
- Set the DisplayName property to something useful for logging and debugging.
- Set the FileName property to "powershell.exe"
- Set the Arguments like this:
"-file """ + SourcesDirectory + "\Scripts\SetAssemblyVersions.ps1"" " + MajorVersionNumber.ToString() + " " + MinorVersionNumber.ToString() + " " + BuildDetail.SourceGetVersion.Substring(1) + " " + BuildDetail.BuildNumber.Substring(BuildDetail.BuildNumber.LastIndexOf(".") + 1)
- Give names to the standard output and error output streams.
- Add a WriteBuildMessage activity under the Handle Standard Output field and set its Message property to the standard output stream defined above.
- Add a WriteBuildError activity under the Handle Error Output field and set its Message property to the error output stream defined above.
Friday, October 29, 2010
Executing a PowerShell script from TFS 2010 workflow
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment