无法加载文件或程序中的NHibernate [英] Could not load file or assembly in NHibernate
问题描述
我最近有一些问题的hibernate.cfg.xml
文件我还没有在下面一行。
I recently had some problems with the hibernate.cfg.xml
file as I hadn't had the following line in.
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
现在,这是我固定碰到下面的错误。
Now that this is fixed I get the following error.
无法加载文件或程序集NHibernate的,版本= 2.1.0.4000,文化=中性公钥= aa95f207798dfdb4'或它的一个依赖。找到的程序集清单定义不匹配程序集引用。 (异常来自HRESULT:0x80131040)
Could not load file or assembly 'NHibernate, Version=2.1.0.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)
为什么我得到这个错误,我该如何解决这个问题?
Why do I get this error and how do I fix it?
推荐答案
这些文件应该在同一目录中引用的文件,NHibernate.dll:
These files should be in the same directory as the referenced file, NHibernate.dll:
-
Antlr3.Runtime.dll
-
Iesi.Collections.dll
-
log4net.dll
-
Castle.Core.dll
-
Castle.DynamicProxy2.dll
Antlr3.Runtime.dll
Iesi.Collections.dll
log4net.dll
Castle.Core.dll
Castle.DynamicProxy2.dll
此外,你应该添加一个引用或复制这一个了:
Also you should add a reference or copy this one too:
- NHibernate.Byte code.Castle.dll
这篇关于无法加载文件或程序中的NHibernate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!