NuGet:NHibernate、Castle.Core 3.0 以及 ProxyFactoryFactory 在哪里? [英] NuGet: NHibernate, Castle.Core 3.0 and where is ProxyFactoryFactory?

查看:17
本文介绍了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 在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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