I added the following attribute to the assemblyinfo.cs file in the activities project: using System.Workflow.ComponentModel.Serialization; [assembly:XmlnsDefinition("http://Myproject/MyActivitiesLib", "MyActivitiesLib")]
also in my workflow runtime initilize methold, I loaded assemblyreference as following: using (WorkflowRuntime runtime = new WorkflowRuntime()) { TypeProvider provider = new TypeProvider(runtime); provider.AddAssemblyReference("MyActivitiesLib.dll"); runtime.AddService(provider); //start workflow ... }
now I can serialize workflow to xoml file and assembly in workflow xoml file, the XML namespace in match the changes as: xmlns:msdn="http://Myproject/MyActivitiesLib"
however when I try to deserialize the file , I got an loaderror as this:
{"Cannot open a designer for the file because the class within it does not inherit from a class that can be visually designed."}