“FileLoadException未处理”在nhibernate [英] "FileLoadException was unhandled" in nhibernate

查看:96
本文介绍了“FileLoadException未处理”在nhibernate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在引用不同的项目,其中代码用n-hibernate编写,我使用引用文件作为

1. Antlr3.Runtime.dll

2.Iesi。 Collections.dll

3. log4net.dll

4. Castle.Core.dll

5. Castle.DynamicProxy2.dll

6. NHibernate.dll

7. NHibernate.ByteCode.Castle.dll

8. NHibernate.Validator.dll

9 .nu​​nit.framework.dll

我收到FileLoadException未处理错误。

详细信息是:

无法加载文件或程序集''NHibernate,Version = 2.1.2.4000,Culture = neutral,PublicKeyToken = aa95f207798dfdb4''或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。(HRESULT的异常:0x80131040)



请有人帮我解决这个问题。

I am referencing different projects,where code written in n-hibernate and i use the references files as
1. Antlr3.Runtime.dll
2. Iesi.Collections.dll
3. log4net.dll
4. Castle.Core.dll
5. Castle.DynamicProxy2.dll
6. NHibernate.dll
7. NHibernate.ByteCode.Castle.dll
8. NHibernate.Validator.dll
9. nunit.framework.dll
I got "FileLoadException was unhandled" Error.
details is:
"Could not load file or assembly ''NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'' or one of its dependencies. The located assembly''s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

please anyone help me about this.

推荐答案

嗨Tanumay,


可能是版本问题,请确保物理NHibernate版本= 2.1.2.4000 (我们可以从例外情况看出这是它正在寻找的版本)



您也可以查看GAC所以看看它持有什么版本。



干杯,

Edo
Hi Tanumay,

Could be a version issue, make sure the physical NHibernate is Version=2.1.2.4000 (we can see from the exception that this is the version is it looking for)

You might also check the GAC so see what version it is holding.

Cheers,
Edo


谢谢,江户Tzumer



我弄错了。

版本中有错误

我通过以下代码解决

< hibernate-configuration xmlns =urn:nhibernate-configuration-2.2>

我也改变了我的映射程序集

< mapping assembly =Project/>

这里Project是资源类型解决方案,其中所有mapper和资源类都存在

并且我也使资源类型和输出类型解决方案的版本相同。
Thanks, Edo Tzumer

I got my fault.
There is error in version
I solve it by the following code
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
and also i change my mapping assembly
<mapping assembly="Project"/>
Here Project is the resource type solutions where all the mapper as well as resource class present
and also i make version of the resource type and output type solutions same.


这篇关于“FileLoadException未处理”在nhibernate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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