无法从单声道中的程序集异常加载类型 [英] Could not load type from assembly exception in mono

查看:45
本文介绍了无法从单声道中的程序集异常加载类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 C# 和 Mono 的新手.我遇到了一个奇怪的问题.我的解决方案中有 2 个项目.一个依赖于另一个称为 CoreLogic 的.我已经设置了依赖,编译成功.但是,当我运行它并向它发送请求时,程序会抛出一个异常,例如:

I am new to c# and mono. and I encountered a strange question. I have 2 projects in my solution. and one is dependent on another one called CoreLogic. I've already set up the dependency and the compilation is successful. However, when I run it and sent it a request, the program throws an exception like:

服务器错误:无法从程序集中加载类型Logic.RedisStorage"'CoreLogic,版本=1.0.5750.32870,文化=中性,PublicKeyToken=null'.

server Error: Could not load type 'Logic.RedisStorage' from assembly 'CoreLogic, Version=1.0.5750.32870, Culture=neutral, PublicKeyToken=null'.

最奇怪的是,我可以看到 Logic.RedisStorage 类存在于 xamarin studio 的程序集 CoreLogic 中.但程序仍然抱怨.那么,这里有什么问题呢?

the strangest thing is that I can see the Logic.RedisStorage class is present in the assembly CoreLogic of xamarin studio. but the program still complains. So, what is wrong here?

我试图重新添加 CoreLogic 的依赖项,但结果是没有运气.这是单声道抱怨的内容:

I've tried to re-add the dependency of CoreLogic, but it turns out no luck. here is what the mono has complained:

程序集版本确实与依赖的服务器相匹配(我现在无法上传 imgs,因此请查看以下链接了解详细信息):

the assembly version does match what server is dependent(I can not upload imgs right now, so check following link for detail):

https://www.evernote.com/l/APWLUXOQa5pAxrm3MUZDhxZ88KkJ2hl>

推荐答案

出现这些情况是因为 Dll 引用的版本号不匹配.

These cases occur because of mismatch of version number of Dll's references.

重建您的 CoreLogic 并删除 CoreLogic 的引用并再次添加引用.

Rebuild your CoreLogic and Remove the refrence of CoreLogic and again add the reference.

这篇关于无法从单声道中的程序集异常加载类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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