Sha*_*ane 4 nhibernate castle-activerecord
我在我的启动中设置了以下代码
IDictionary<string, string> properties = new Dictionary<string, string>();
properties.Add("connection.driver_class", "NHibernate.Driver.SqlClientDriver");
properties.Add("dialect", "NHibernate.Dialect.MsSql2005Dialect");
properties.Add("proxyfactory.factory_class", "NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle");
properties.Add("connection.provider", "NHibernate.Connection.DriverConnectionProvider");
properties.Add("connection.connection_string", "Data Source=ZEUS;Initial Catalog=mydb;Persist Security Info=True;User ID=sa;Password=xxxxxxxx");
InPlaceConfigurationSource source = new InPlaceConfigurationSource();
source.Add(typeof(ActiveRecordBase), (IDictionary<string, string>) properties);
Assembly asm = Assembly.Load("Repository");
Castle.ActiveRecord.ActiveRecordStarter.Initialize(asm, source);
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
failed: NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException : Unable to load type 'NNHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle' during configuration of proxy factory class.
可能的原因是:
我已阅读并阅读我正在参考列出的所有大会,我完全不知道接下来要尝试什么.
Castle.ActiveRecord.dll
Castle.DynamicProxy2.dll
Iesi.Collections.dll
log4net.dll
NHibernate.dll
NHibernate.ByteCode.Castle.dll
Castle.Core.dll.
我100%确定装配在箱子里.有人有主意吗?
当NHibernate.ByteCode.Castle.dll使用不同的目标平台作为您的项目构建时,会发生此问题.要对此进行测试,请从以下一项或多项更改您的程序目标平台:
如果其中任何一个解决了您的问题,那么您就知道您只需要同步DLL和目标平台.
| 归档时间: |
|
| 查看次数: |
4612 次 |
| 最近记录: |