NuGet:NHibernate,Castle.Core 3.0和ProxyFactoryFactory在哪里?

时间:2012-01-19 08:25:41

标签: nhibernate nuget castle castle-dynamicproxy nuget-package

我在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>

这导致:

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.

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

p.s。:在Castle.Core 3.0 - 包的描述中,有人说:...包括DynamicProxy ......

1 个答案:

答案 0 :(得分:10)

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

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

相关问题