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.
来源:https://stackoverflow.com/questions/8922999/nuget-nhibernate-castle-core-3-0-and-where-is-proxyfactoryfactory