Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 426
sl3dg3 Avatar asked Jan 19 '12 08:01

sl3dg3


1 Answers

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.

like image 54
Diego Mijelshon Avatar answered Sep 23 '22 03:09

Diego Mijelshon