Keith Adler
Keith Adler

Reputation: 21178

Windows Workflow 4.0 Activities not being added to the toolbox

I've created a class project in VS 2010 Beta 2. I've added one Activity to it. Saved it. Created another Activity. I would expect the first Activity to appear in the toolbox so I could drag it into my workflow, but it's not. Any ideas?

Upvotes: 2

Views: 3126

Answers (6)

Christophe
Christophe

Reputation: 101

Not really the same question but in Visual Studio 2012, on a 64 bit windows, I had a 64 bit application with CodeActivity and NativeActivity and they were not showing up in the toolbox. I changed the application to AnyCPU and built it, and the activities are now displayed... I hope it will help someone :)

Upvotes: 1

John
John

Reputation: 1247

I experienced this issue too. My workflow service project was part of a solution with other projects. I removed the workflow service project from the main solution and created a new solution only containing the workflow service project. After a build, the custom activities were generated and listed in the toolbox.

Upvotes: 2

leifbattermann
leifbattermann

Reputation: 632

I don't know if this is still relevant for you but I had the same problem.

I could solve it like this:

  • Right click on the Toolbox to open context menu.
  • Select Choose Items...
  • Select the tab System.Activities Components
  • Click on browse and select the dll that contains the custom activity
  • Make sure that the activity shows in the list and is checked
  • Click OK

Upvotes: 1

Rohland
Rohland

Reputation: 1427

I had this problem with Visual Studio 2010 RTM as well. I wrote a blog post with a potential solution here.

Essentially, the toolbox doesn't load your custom activities if you have two projects in your solution that share the same folder.

Upvotes: 4

Russ Clark
Russ Clark

Reputation: 13440

Make sure your Custom Activity class is marked as public.

Upvotes: 3

Keith Adler
Keith Adler

Reputation: 21178

I resolved this by creating a Windows Workflow 4.0 Console application and then removing out the Program.cs. Very odd, but it worked.

Upvotes: 0

Related Questions