Following piece of code throws the exception where element.workpath is the path to the xaml filethe code is part of a running service , that needs to execute workflows.Activity activity = ActivityXamlServices.Load(element.WorkflowPath);WorkflowInvoker.Invoke(activity, new Dictionary<string, object> { { "InEvent", e } });When loading the attached xaml activity an exception occurs It seems to fail on a part of the xaml : <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>When I remove this line it continues to load and even executes the flow but I can not access the arguments provided.Failed to create a 'Settings' from the text 'Assembly references and imported namespaces serialized as XML namespaces'.</log4j:message><log4j:properties><log4j:data name="log4net:UserName" value="XPSP2TEST\Colos" /><log4j:data name="log4jmachinename" value="xpsp2test" /><log4j:data name="log4japp" value="DebugStart.exe" /><log4j:data name="log4net:HostName" value="xpsp2test" /></log4j:properties><log4j:throwable><![CDATA[System.Xaml.XamlObjectWriterException: Failed to create a 'Settings' from the text 'Assembly references and imported namespaces serialized as XML namespaces'. ---> System.TypeLoadException: Could not load type 'System.Activities.ReferenceAssemblyDeclarationAttribute' from assembly 'System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable) at System.Reflection.CustomAttribute.IsDefined(RuntimeAssembly assembly, RuntimeType caType) at System.Reflection.RuntimeAssembly.IsDefined(Type attributeType, Boolean inherit) at Microsoft.VisualBasic.Activities.XamlIntegration.VisualBasicExpressionConverter.AssemblyCache.EnsureInitialized() at Microsoft.VisualBasic.Activities.XamlIntegration.VisualBasicExpressionConverter.CollectXmlNamespacesAndAssemblies(ITypeDescriptorContext context) at Microsoft.VisualBasic.Activities.XamlIntegration.VisualBasicSettingsConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateObjectWithTypeConverter(ServiceProviderContext serviceContext, XamlValueConverter`1 ts, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateFromValue(ServiceProviderContext serviceContext, XamlValueConverter`1 ts, Object value, XamlMember property) at System.Xaml.XamlObjectWriter.Logic_CreateFromValue(ObjectWriterContext ctx, XamlValueConverter`1 typeConverter, Object value, XamlMember property, String targetName, IAddLineInfo lineInfo)
Product Language
Version
Operating System
Operating System Language
Steps to Reproduce
Actual Results
Expected Results
Please wait...