How to run another activity in a customized activity of TFS 2012 build process template?

此生再无相见时 提交于 2020-01-05 11:13:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!