이 게시물에서는이 post의 인터페이스를 사용하여 모든 ProxyFactory 종속성을 제거했습니다. 그래서 hibernate.cfg.xml 파일에서 사용할 구현을 지정해야합니다. 나는이 구성했습니다 : 나는 NHibernate.ByteCode.Castle.dll
에 refernce를 추가 한NHibernate 2.1.0의 문제점은 무엇입니까? 나는 항상 오류가 발생합니다!
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Data Source=.\SQLEXPRESS;Initial Catalog=MYDB;Integrated Security=true</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
</session-factory>
</hibernate-configuration>
합니다. MBunit을 사용하여 테스트를 실행하면 배포 폴더에 NHibernate.ByteCode.Castle.dll
또는 NHibernate.ByteCode.LinFu.dll
이 포함되어야한다는 오류가 나타납니다. 이것이 올바른 구성이라고 생각합니다. 하지만 작동하지 않습니다. 나는 뒤에 많은 시간을 보냈다.
추신 : NHibernate를 donwload했을 때, NHibernate.ByteCode.Castle 프로젝트가 구축되지 않았습니다. 프로젝트에 솔루션을 추가하고 빌드했습니다. 그런 다음 어셈블리를 참조했습니다.