当我将NHibernate从2升级到3时,我的SQLite tem数据库显示错误:
无法找到适合指定文化或中性文化的任何资源。确保在编译时将“System.Data.SQLite.SR.resources”正确嵌入或链接到程序集“System.Data.SQLite”中,或者所有所需的附属程序集都是可加载和完全签名的。
使用SQL Server的项目工作正常,但使用SQLite的测试项目显示此错误。
任何解决方案?
我的CFG:
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="show_sql">true</property>
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
<property name="dialect">NHibernate.Dialect.SQLiteDialect</property>
<property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>`
韩国社交协会[]
帕特里克科埃略答案 0 :(得分:0)
可能你已经找到了解决方案。但我遇到了同样的问题。这个设置(使用Fluent Nh配置)为我解决了这个问题:
.Database(SQLiteConfiguration.Standard.InMemory().Raw("hbm2ddl.keywords", "none").ShowSql())
这是做魔术的“原始”事物。我从这篇文章中得到了它:NHibernate on SQLite 3.0 – a workaround for “Could not find any resources appropriate for the specified culture or the neutral culture”