Compartilhar via


Toolbox and Custom Activities

Couple of customers have complained that I have my assembly with all the custom activities referenced in the Workflow project and still I don't see them even on a Re-build in my toolbox.

Hence, I wanted to clarify the functionality we have in place for having custom activities show up in the toolbox:

1. If your custom activity is part of the same project, once you build the project and if the build succeeds, the activity would appear in the Toolbox under the current activity’s namespace name category.

2. If your custom activity is part of the different project in the same solution though as your workflow, it would appear still appear in the toolbox on a build, again under the activity’ namespace name category. Please specifically note that you would not need to add the project or assembly references to your custom activity projects into your workflow project. The assembly reference would be added automatically as part of the drag drop of the activity into the workflow.

3. Finally, if you have an assembly with custom activities which is not part of the solution, then, the user would have to use the “Choose Toolbox Items” dialog launched through the “Choose Items…” context menu in toolbox. In this dialog the user would need to click on the “System.Activities” tab and through the Browse, select the custom activity assembly and click OK.

image

This should get the custom activities in the list and clicking on “OK” on this dialog should add the custom activities from this assembly in the toolbox. They would then be added to the category under/from which the Choose toolbox Items was launched. Again, in this case the assembly reference wouldn't be immediately added to the workflow project. Only on the drag-drop of any activity from this assembly, would the assembly reference would be added.

 

Thanks,

Kushal.

Comments

  • Anonymous
    November 05, 2009
    This is not working consistently in beta2.  I've followed your instructions as written and tested on 2 machines, but my custom activity libraries will not show up in the toolbox.

  • Anonymous
    November 12, 2009
    Switch to Release mode and they pop right up in the toolbox.  Subb'd a bug report on it. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=509804

  • Anonymous
    November 13, 2009
    I have found a different problem with a different solution. My custom activities didn't show up in the toolbox as long as I had my .sln file in a different direcory from the project file. After moving the solution file in the same directory of the project, my custom activities showed up in the toolbox. Very strange...

  • Anonymous
    November 20, 2009
    @ldicocco: We are not able to repro the issue. Can you please send me your repro whe you dont see the activities at kushals at microsoft dot com

  • Anonymous
    January 07, 2010
    Great explaination, Thanks! For the 3rd option, is there a way to add this programmatically?