NuGet:NHibernate、Castle.Core 3.0 以及 ProxyFactoryFactory 在哪里?
我使用 NuGet 为新项目安装了 NHibernate 和 Castle.Core 3.0 软件包。通常我们手动复制 dll;这是我第一次使用 NuGet 这样做。
现在我不知道如何配置ProxyFactoryFactory,或者说,我找不到它。我在项目中引用了 NHibernate 和 Castle.Core(我在 Castle.Core 包中可以找到的唯一 dll),并配置了以下内容:
<property name="proxyfactory.factory_class">
NHibernate.ByteCode.Castle.ProxyFactoryFactory,
NHibernate.ByteCode.Castle
</property>
这导致:
类初始化方法 Tests.UnitTest1.MyClassInitialize 引发异常。 NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException: NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException:无法 加载类型'NHibernate.ByteCode.Castle.ProxyFactoryFactory, 配置代理工厂类期间的“NHibernate.ByteCode.Castle”。
显然这个dll丢失了,但是我在哪里可以找到它呢? NuGet 中有一个名为 Castle.DynamicProxy
的包,但它被标记为已过时。
ps:在Castle.Core 3.0 - 包的描述中,说:...包括DynamicProxy ...
I installed with NuGet the packages NHibernate and Castle.Core 3.0 for a new project. Usually we copied around the dlls manually; it is the first time I do that with NuGet.
Now I can't find out how to configure the ProxyFactoryFactory, or let's say, I can't find it. I referenced NHibernate and Castle.Core (the only dll I could find in the Castle.Core - package) within the project, and configured the following:
<property name="proxyfactory.factory_class">
NHibernate.ByteCode.Castle.ProxyFactoryFactory,
NHibernate.ByteCode.Castle
</property>
This leads to:
Class Initialization method Tests.UnitTest1.MyClassInitialize threw exception. NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException: NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException: Unable to load type 'NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle' during configuration of proxy factory class.
Obviously this dll is missing, but where can I find that? There is a package in NuGet called Castle.DynamicProxy
, but it is marked as obsolete.
p.s.: In the description of the Castle.Core 3.0 - package, it is said: ... including DynamicProxy ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
NHibernate 的最新版本不需要配置代理工厂。
默认情况下使用内部适配器,旧适配器不再是项目的一部分。
The last versions of NHibernate do not require configuring a proxy factory.
An internal one is used by default and the old adapters are not part of the project anymore.