locked
Can't add custom activities in toolbox if using solution folders RRS feed

  • Question

  • Steps to reproduce the bug :

    1) Create a new C# Class Library
    2) Add New Item > Workflow > Code Activity
    3) Add New Item > Workflow > Activity
    4) Build (We see the CodeActivity1 in the tool bar when edition Activity1.xaml)
    5) Add a new Solution Folder
    6) Move the ClassLibrary1 into the solution folder
    7) Build


    Result : The CodeActivity1 disapear from the Toolbox.

    So, is there any way to use the toolbox when using the solution folders, or the only workaround is to place the project at solution root?

    Friday, November 20, 2009 1:48 PM

Answers

  • The issue with activities not showing up with a solution folder present is known in the Beta2. We have already fixed it and wont occur for the latest bits. In the meantime, Can you take a look at this post and see if Choose toolbox Items can be a reasonable workaround for now.

    http://blogs.msdn.com/kushals/archive/2009/10/28/toolbox-and-custom-activities.aspx

    Thanks,
    Kushal.
    Kushal Shah - This posting is provided "AS IS" with no warranties, and confers no rights
    • Proposed as answer by kushals Monday, November 23, 2009 7:03 AM
    • Marked as answer by Instriker Monday, November 23, 2009 12:58 PM
    Monday, November 23, 2009 7:02 AM

All replies

  • After further investigations, I noted that the ordre of the projects in the .sln file is also important. For exemple, with this .sln file, I won't find my custom activities in the toolbox :

    Microsoft Visual Studio Solution File, Format Version 11.00
    # Visual Studio 2010
    Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NewFolder1", "NewFolder1", "{18C2DE6C-2FA5-4FE2-8C7C-91A2D867254E}"
    EndProject
    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary3", "ClassLibrary3\ClassLibrary3.csproj", "{034912F7-FC64-4D38-9FD8-FC5776040A0F}"
    EndProject
    Global
    	GlobalSection(TestCaseManagementSettings) = postSolution
    		CategoryFile = ClassLibrary3.vsmdi
    	EndGlobalSection
    	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    		Debug|Any CPU = Debug|Any CPU
    	EndGlobalSection
    	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    		{034912F7-FC64-4D38-9FD8-FC5776040A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    		{034912F7-FC64-4D38-9FD8-FC5776040A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
    	EndGlobalSection
    	GlobalSection(SolutionProperties) = preSolution
    		HideSolutionNode = FALSE
    	EndGlobalSection
    EndGlobal
    

    But with this one, I see the custom activties :

    Microsoft Visual Studio Solution File, Format Version 11.00
    # Visual Studio 2010
    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary3", "ClassLibrary3\ClassLibrary3.csproj", "{034912F7-FC64-4D38-9FD8-FC5776040A0F}"
    EndProject
    Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NewFolder1", "NewFolder1", "{18C2DE6C-2FA5-4FE2-8C7C-91A2D867254E}"
    EndProject
    Global
    	GlobalSection(TestCaseManagementSettings) = postSolution
    		CategoryFile = ClassLibrary3.vsmdi
    	EndGlobalSection
    	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    		Debug|Any CPU = Debug|Any CPU
    		Release|Any CPU = Release|Any CPU
    	EndGlobalSection
    	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    		{034912F7-FC64-4D38-9FD8-FC5776040A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    		{034912F7-FC64-4D38-9FD8-FC5776040A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
    		{034912F7-FC64-4D38-9FD8-FC5776040A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
    		{034912F7-FC64-4D38-9FD8-FC5776040A0F}.Release|Any CPU.Build.0 = Release|Any CPU
    	EndGlobalSection
    	GlobalSection(SolutionProperties) = preSolution
    		HideSolutionNode = FALSE
    	EndGlobalSection
    EndGlobal
    


    So putting the class library project before the solution folder in the sln can change the behavior of the toolbox.

    But even with the order changed, the toolbox still not work for custom activities if the project is in a solution folder.
    Friday, November 20, 2009 2:49 PM
  • The issue with activities not showing up with a solution folder present is known in the Beta2. We have already fixed it and wont occur for the latest bits. In the meantime, Can you take a look at this post and see if Choose toolbox Items can be a reasonable workaround for now.

    http://blogs.msdn.com/kushals/archive/2009/10/28/toolbox-and-custom-activities.aspx

    Thanks,
    Kushal.
    Kushal Shah - This posting is provided "AS IS" with no warranties, and confers no rights
    • Proposed as answer by kushals Monday, November 23, 2009 7:03 AM
    • Marked as answer by Instriker Monday, November 23, 2009 12:58 PM
    Monday, November 23, 2009 7:02 AM