C#中找不到组件,已加载 [英] C# can't find assembly which is already loaded

查看:130
本文介绍了C#中找不到组件,已加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写它采用插件的应用程序。插件是它存在于插件目录中类库。通过LoadFrom我的应用程序加载这些库。他们中有些人在其中处于同一插件目录库的形式依赖。当我尝试从通过Activator.CreateInstance插件之一,创建类的实例我收到一个异常无法找到程序集(这是插件的依赖组装),但该组件已加载(!)以及插件,它是可见ProcessExplorer。 我不能uderstand什么我的麻烦。

I am writing an application which uses plugins. Plugins are class libraries which lie in Plug-ins directory. My app loads these libraries via LoadFrom. Some of them have dependencies in the form of libraries which lie in the same Plug-ins directory. When I try to create instance of class from one of plugins via Activator.CreateInstance i recieve an exception 'Unable to find assembly' (this is dependency assembly of plugin), but this assembly is already loaded (!) along with plugins and It is visible in ProcessExplorer. I can't uderstand in what my trouble is.

推荐答案

我有类似的问题,他们通常通过改变目标框架在项目属性解决...

I had similar problems and they were usually solved by changing target framework in the project properties...

这篇关于C#中找不到组件,已加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆