Imports are not automatically added to the Imports designer when WorkflowDesigner.Load (Object) is called

Article translations Article translations
Article ID: 2015702 - View products that this article applies to.
Expand all | Collapse all


In a rehosted application, the Imports designer is not refreshed after WorkflowDesigner.Load Method (Object) is called. The Object may be an activity with expressions, and the expressions may be unexpectedly invalid because there are no namespaces in the Imports designer.

Note For more information about WorkflowDesigner.Load Method (Object), see the WorkflowDesigner.Load Method (Object) topic on MSDN.



This behavior is by design. The user must explicitly set VisualBasicSettings before an object is loaded.

Note For more information about VisualBasicSettings, see the VisualBasicSettings topic on MSDN.


Before the object is loaded, set VisualBasicSettings on the root workflow activity by calling the VisualBasic.SetSettings method.

Note For more information about the VisualBasic.SetSettings method, see the VisualBasic.SetSettings method topic on MSDN.

The following code example shows the calling sequence.


            VisualBasicSettings settings = VisualBasic.GetSettings(rootActivity);     

            if (settings == null)


                settings = new VisualBasicSettings();               



            settings.ImportReferences.Add(new VisualBasicImportReference() { Import = requiredNamespace, Assembly = requiredAssemblyName });


            VisualBasic.SetSettings(rootActivity, settings);



Article ID: 2015702 - Last Review: April 12, 2010 - Revision: 1.0
  • Windows Workflow Foundation

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from