NuGet:NHibernate、Castle.Core 3.0 以及 ProxyFactoryFactory 在哪里?

编程入门 行业动态 更新时间:2024-10-27 20:39:05
本文介绍了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</属性>

这导致:

类初始化方法Tests.UnitTest1.MyClassInitialize 抛出异常.NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException:NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException:无法加载类型'NHibernate.ByteCode.Castle.ProxyFactoryFactory,NHibernate.ByteCode.Castle' 在代理工厂类的配置期间.

显然这个 dll 丢失了,但我在哪里可以找到呢?NuGet 中有一个名为 Castle.DynamicProxy 的包,但它被标记为已过时.

p.s.:Castle.Core 3.0 - 包的描述中说:...包括DynamicProxy ...

解决方案

NHibernate 的最新版本不需要配置代理工厂.

默认使用内部适配器,旧适配器不再是项目的一部分.

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 ...

解决方案

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.

更多推荐

NuGet:NHibernate、Castle.Core 3.0 以及 ProxyFactoryFactory 在哪里?

本文发布于:2023-11-17 06:35:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609171.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Castle   NHibernate   NuGet   ProxyFactoryFactory   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!