本文介绍了加载Xmal文件时如何解决未知类型问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试从 Xaml 文件加载工作流时遇到此错误,无法创建未知类型 '{clr-namespace:ActivityLibrary1;assembly=ActivityLibrary1}MyActivity1'".我正在尝试从类库项目加载 Xaml.ActivityLibrary1 是包含自定义活动的库.我试图通过处理 currentDomain.AssemblyResolve += new ResolveEventHandler(MyResolveEventHandler) 事件在运行时解析程序集.它无法找到的程序集是 System.Xaml.Resources.有什么想法吗??

I am facing this error, "Cannot create unknown Type '{clr- namespace:ActivityLibrary1;assembly=ActivityLibrary1}MyActivity1'" while trying to load a worklfow from Xaml file. I am trying to load Xaml from a class library project. ActivityLibrary1 is library that contains custom activity. I tried to resolve assembly at runtime by handling the currentDomain.AssemblyResolve += new ResolveEventHandler(MyResolveEventHandler) event. The assembly which it is unable to find is System.Xaml.Resources. Any ideas??

推荐答案

将程序集放入 Clr 4.0 的 GAC 中解决的问题

Problem solved by putting assembly in Clr 4.0's GAC

这篇关于加载Xmal文件时如何解决未知类型问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 23:52