How do I get my custom activities to appear in the toolbox?

I have a project with some activities which all appear in the toolbox while I’m working with the project. Next I compile the project, open a new project, and reference the assembly from the first project. What do I have to do to get the activities from the first project to appear in the toolbox automatically?
I’m using the ToolboxItem as shown below:

[ToolboxBitmap(typeof(Page),"ExtendedCodeActivity.ico")]

[ToolboxItem(typeof(ActivityToolboxItem))]

[Description("Like a System.Workflow.Activities.CodeActivity")]

[Designer(typeof(ExtendedCodeActivityDesigner),typeof(IDesigner))]

publicpartialclassExtendedCodeActivity :Activity

{

...

}

Should I use the ToolboxItemAttribute instead? What is the difference?

Mikael

[1907 byte] By [MikaelH?kansson] at [2007-12-22]
# 1

Instead of referencing the assembly, add the item to your toolbox. Right click on the toolbox, click "choose items" then in the dialog, click on the activities tab. Now click the "browse" button and find your assembly. OK out of the dialog and your activities should be in the toolbox. When you drag them on, VS will add the reference for you.

Matt

MattMilner-Pluralsight at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

As I’ve built a project template, I did not want the user to have to go through this step. By selecting the project template, I want the toolbox to be prepopulated with the activities.

Mikael

MikaelH?kansson at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

You might want to look at using policy along with your template then.

http://msdn2.microsoft.com/en-us/library/f9yfbax1.aspx

This should let you specify toolbox items that go along with your template. Not 100% sure this works for what you want, but I think it is your best shot.

Matt

MattMilner-Pluralsight at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified