XAML节点流:在EndObject之前缺少CurrentObject

时间:2017-02-03 15:10:16

标签: c# .net wpf xaml workflow

我在Workflow服务中遇到以下错误。我在谷歌上搜索过,但没有找到任何有用的信息。我找到了这个链接但无法理解。 https://social.msdn.microsoft.com/Forums/vstudio/en-US/ba29b516-7ff4-4fea-b0a5-5ebda5283664/xaml-node-stream-missing-currentobject-before-endobject?forum=wfprerelease

问题是随机发生的,内部异常是

at System.Xaml.XamlObjectWriter.WriteEndObject() at System.Xaml.XamlObjectWriter.Dispose(Boolean disposing) at System.Xaml.XamlWriter.System.IDisposable.Dispose() at System.Activities.XamlIntegration.ActivityXamlServices.InitializeComponentFromXamlResource(Type componentType, String resource, Object componentInstance, XamlSchemaContext schemaContext) at System.Activities.XamlIntegration.ActivityXamlServices.InitializeComponent(Type componentType, Object componentInstance)

1 个答案:

答案 0 :(得分:1)

Just in case somebody needs an answer: Remove references for System.Activities.Presentation, PresentationCore, PresentationFramework, WindowsBase modules from the project.

Also check GC mode, in runtime it should reap benefits of running on multiple cores. To enable Server mode:

<configuration>  
   <runtime>  
      <gcServer enabled="true"/>  
   </runtime>  
</configuration> 

Please refer gcServer documentation for more details: https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/gcserver-element