问题
I'm writing a customized activity for TFS build process workflow, e.g. guideline here.
In my C# CodeActivity .Execute() method, I want to run another activity, e.g. ConvertWorkspaceItem
as descibed here.
How can I do that?
回答1:
Try doing some research with a NativeActivity instead of a CodeActivity, so the execution context allows you to schedule other child activities. E.g.:
class YourActivity : NativeActivity
{
protected override void Execute(NativeActivityContext context)
{
ConvertWorkspaceItem it = new ConvertWorkspaceItem();
context.ScheduleActivity(it);
}
}
来源:https://stackoverflow.com/questions/21092460/how-to-run-another-activity-in-a-customized-activity-of-tfs-2012-build-process-t