silverlight   发布时间:2022-05-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Silverlight 5.0应用prism的Mef容器总是报错的解决方案大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

      如果本机安装的是Silverlight 5.0版本,而你要用prism版本的Mef容器,就会一直出错,出错的信息是:Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.        查看详细的错误信息是:System
      如果本机安装的是Silverlight 5.0版本,而你要用prism版本的Mef容器,就会一直出错,出错的信息是:Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

       查看详细的错误信息是:System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule modulE)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.HosTing.AssemblyCatalog.get_InnerCatalog()
   at System.ComponentModel.Composition.HosTing.AssemblyCatalog.get_Parts()
   at Microsoft.Practices.Prism.MefExtensions.DefaultPrismserviceRegistrar.GetrequiredPrismPartsToRegister(AggregateCatalog aggregateCatalog)
   at Microsoft.Practices.Prism.MefExtensions.DefaultPrismserviceRegistrar.RegisterrequiredPrismservicesIfMissing(AggregateCatalog aggregateCatalog)
   at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.RegisterDefaultTypesIfMissing()
   at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.Run(Boolean runWithDefaultConfiguration)
   at Microsoft.Practices.Prism.bootstrapper.Run()
   at SilverlightPrism.App.Application_Startup(Object sender,StartupEventArgs E)
   at Ms.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex,Delegate handlerDelegate,Object sender,Object args)
   at Ms.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj,IntPtr unmanagedObjArgs,Int32 argsTypeIndex,Int32 actualArgsTypeIndex,String eventName,UInt32 flags)

解决这个错误的办法是:把Silverlight客户端的Silverlight版本改为4.0就可以了,我不知道还有没有其它更好的解决方案,如果有请指教了。

但如果你是用Sliverlight 5.0版本,而用prism的Unity容器的话,是没有这个错误的。

大佬总结

以上是大佬教程为你收集整理的Silverlight 5.0应用prism的Mef容器总是报错的解决方案全部内容,希望文章能够帮你解决Silverlight 5.0应用prism的Mef容器总是报错的解决方案所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。