Assembly.LoadFrom()失败

编程入门 行业动态 更新时间:2024-10-28 19:28:51
本文介绍了Assembly.LoadFrom()失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好, 我希望能够通过从OpenFileDialog中选择一个dll来加载程序集。 这似乎有效,当它出现时汇编参考第三方dll的。 就这么简单: Dim myAssembly As [Assembly] = [汇编] .LoadFile(FileName) 抛出以下异常: System.Reflection.ReflectionTypeLoadException:一个或多个类型程序集无法加载。 在System.Reflection.Module.GetTypesInternal(StackCra wlMark& stackMark) 在System.Reflection.Assembly.GetTypes() at Stegosoft.AssemblySniffer.Form1.ScanAssembly(strin g FileName)in ........ 任何sugestions? TIA, Michael

解决方案

这些是第三方dll的.NET程序集吗? - OHM(特里伯恩斯) 。 。 。单手人。 。 如果你需要我的电子邮件,请问我 当你不知道自己在做什么时,过得很快 " Michael Maes" < MI ***** @ merlot>在留言新闻中写道:eE ************** @ TK2MSFTNGP11.phx.gbl ... 您好, 我希望能够通过从OpenFileDialog中选择一个dll来加载程序集。 这似乎有用,当程序集引用第三方dll时会执行。 就是这个简单的界限: Dim myAssembly As [Assembly] = [Assembly] .LoadFile(FileName) 引发以下异常: System.Reflection.ReflectionTypeLoadException:程序集中的一个或多个类型无法加载。 在System。 Reflection.Module.GetTypesInternal(StackCra wlMark& stackMark) at System.Reflection.Assembly.GetTypes() at Stegosoft.AssemblySniffer.Form1.ScanAssembly(Strin g FileName)在........ 任何sugestions? TIA, Michael

迈克尔, 您可以通过引用它们来使用第三方程序集直接而不是通过反射使用它们的? 此外,第三方程序集可能需要一些可能导致问题的依赖模块。 您可以尝试使用Fuslogvw.exe工具查看程序集绑定期间是否存在任何融合 错误。 程序集绑定日志查看器(Fuslogvw.exe) msdn.microsoft/library/de...us/cptools/htm l / cpgrfFusionLogViewerFuslogvwexe.asp Best问候, Peter Huang 微软在线合作伙伴支持 安全! - www.microsoft/security 此帖子原样是按原样提供的。没有保证,也没有授予任何权利。

嗨特里, 是的,这发生在一个Janus系统(v2)程序集参与其中。 我唯一想要获得的是扫描(大量)程序集以绘制对象模型。 Lutz Roeder '.NET Reflector可以加载程序集,所以我猜我正在使用错误的方法.... 问候, Michael One Handed Man(OHM - Terry Burns)" < news.microsoft>在消息新闻中写道:uZ ************** @ TK2MSFTNGP12.phx.gbl ... 这些是第三方dll的.NET程序集吗? br /> - OHM(特里伯恩斯) 。 。 。单手人。 。 如果你需要我的电子邮件,请问我 当你不知道自己在做什么时,过得很快

Hello, I want to be able to load an assembly by selecting a dll from an OpenFileDialog. This seems to work, exept when that assembly references "3rd-Party dll''s". Just this simple line: Dim myAssembly As [Assembly] = [Assembly].LoadFile(FileName) throws the following exception: System.Reflection.ReflectionTypeLoadException: One or more of the types in the assembly unable to load. at System.Reflection.Module.GetTypesInternal(StackCra wlMark& stackMark) at System.Reflection.Assembly.GetTypes() at Stegosoft.AssemblySniffer.Form1.ScanAssembly(Strin g FileName) in ........ Any sugestions? TIA, Michael

解决方案

Are these 3rd party dll''s .NET assemblies ? -- OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me Time flies when you don''t know what you''re doing "Michael Maes" <mi*****@merlot> wrote in message news:eE**************@TK2MSFTNGP11.phx.gbl... Hello, I want to be able to load an assembly by selecting a dll from an OpenFileDialog. This seems to work, exept when that assembly references "3rd-Party dll''s". Just this simple line: Dim myAssembly As [Assembly] = [Assembly].LoadFile(FileName) throws the following exception: System.Reflection.ReflectionTypeLoadException: One or more of the types in the assembly unable to load. at System.Reflection.Module.GetTypesInternal(StackCra wlMark& stackMark) at System.Reflection.Assembly.GetTypes() at Stegosoft.AssemblySniffer.Form1.ScanAssembly(Strin g FileName) in ........ Any sugestions? TIA, Michael

Hi Michael, Can you use the 3rd-party assembly by referencing them directly instead of using them by reflection? Also the 3rd-party assembly may need some dependent module which may cause the problem. You may try to use the Fuslogvw.exe tool to see if there is any fusion error during the assembly binding. Assembly Binding Log Viewer (Fuslogvw.exe) msdn.microsoft/library/de...us/cptools/htm l/cpgrfFusionLogViewerFuslogvwexe.asp Best regards, Peter Huang Microsoft Online Partner Support Get Secure! - www.microsoft/security This posting is provided "AS IS" with no warranties, and confers no rights.

Hi Terry, Yes, this happens when a Janus System (v2) Assembly gets involved. The only thing I want to obtain is scan (a lot) of assemblies to draw an "Object Model". Lutz Roeder''s .NET Reflector can load the assemblies so I guess I''m using the wrong approach.... Regards, Michael "One Handed Man ( OHM - Terry Burns )" <news.microsoft> wrote in message news:uZ**************@TK2MSFTNGP12.phx.gbl... Are these 3rd party dll''s .NET assemblies ? -- OHM ( Terry Burns ) . . . One-Handed-Man . . . If U Need My Email ,Ask Me Time flies when you don''t know what you''re doing

更多推荐

Assembly.LoadFrom()失败

本文发布于:2023-11-13 11:45:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584275.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Assembly   LoadFrom

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!