Cannot create unknown type '{clr-namespace:Server.Business.Logic.Workflows.StateMachines.Activities}EnterState'.
Happens because can’t find assembly
1 List<Assembly> ass = new List<Assembly>(); 2 Assembly asm = AppDomain.CurrentDomain.Load("Server.Business.Logic"); 3 foreach (AssemblyName refAsmName in asm.GetReferencedAssemblies()) 4 { 5 ass.Add(AppDomain.CurrentDomain.Load(refAsmName)); 6 } 7 8 ass.Add(asm);
does’ not work
1 xx.LocalAssembly = asm; 2 3 XamlReader reader = ActivityXamlServices.CreateBuilderReader(new XamlXmlReader(ofd.FileName, xx));
does work