locked
Rehosted Designer - ForEach Save Problem RRS feed

  • Question

  • When saving an Activity generated within the rehosted designer, the contents of a a ForEach or ParallelForEach are not saved.  If saved from VS it is loaded fine but not saved.  Is this a known bug ?
    Monday, December 28, 2009 10:15 PM

Answers

  • Hi Mike,
    I think the issue there is probably that the AssemblyName also needs changing. The factory class is actually in System.Activities.Core.Presentation assembly.
    Tim
    Monday, December 28, 2009 11:39 PM

All replies

  • It's probably a binding issue caused by the ActivityAction delegate having a null handler. Those things are a pain to debug. Are you using a ForEach from a rehosted toolbox added like this?

    new ToolboxItemWrapper(typeof(System.Activities.ForEach<>))

    please instead try using:

    new ToolboxItemWrapper(typeof(System.Activites.Core.Presentation.Factories.ForEachWithBodyFactory<>))

    which will create you a more fully initialized ForEach<> activity that the designer can work with.
    Monday, December 28, 2009 11:08 PM
  • This gives a could not load type error.  I changed:

     

     

     

    <sadt:ToolboxItemWrapper AssemblyName="{StaticResource AssemblyName}" ToolName="System.Activites.Statements.ForEach"/>

    to

     

     

     

    <sadt:ToolboxItemWrapper AssemblyName="{StaticResource AssemblyName}" ToolName="System.Activites.Core.Presentation.Factories.ForEachWithBodyFactory"/>

    Monday, December 28, 2009 11:33 PM
  • Hi Mike,
    I think the issue there is probably that the AssemblyName also needs changing. The factory class is actually in System.Activities.Core.Presentation assembly.
    Tim
    Monday, December 28, 2009 11:39 PM