NuGet: NHibernate, Castle.Core 3.0 and where is ProxyFactoryFactory?

无人久伴 提交于 2019-12-28 13:56:39

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/8922999/nuget-nhibernate-castle-core-3-0-and-where-is-proxyfactoryfactory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!