J'ai problème avec cette exception:NHibernate + SqlServerCe
Hibernate.HibernateException : Could not create the driver from Hibernate.Driver.SqlServerCeDriver.
----> System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> NHibernate.HibernateException : The IDbCommand and IDbConnection implementation in the ssembly System.Data.SqlServerCe could not be found. Ensure that the assembly System.Data.SqlServerCe is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly.
J'ai tout essayé. J'ai beaucoup googlé.
System.Data.SqlServerCe.dll se trouve dans le répertoire de débogage. Est-ce que local est référencé, n'est-ce pas? J'ai copie locale définie vrai. Dans le répertoire de débogage est tous les autres sql * .dll nécessaires. J'ai essayé la compilation x86 mais rien.
Voici ma config NHibernate:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.Spring.ProxyFactoryFactory, NHibernate.ByteCode.Spring</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.MsSqlCeDialect</property>
<property name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver</property>
<property name="show_sql">true</property>
<!-- mapping files -->
</session-factory>
</hibernate-configuration>
Version NHibernate 3.0 beta 1, la version SqlServerCe 3.5 SP1
Mon idée: Nhibernate regarder encore GAC, becouse un avait installé SqlServerCe, désinstaller après la le problème commence. Comment puis-je dire à NHibernate: "s'il vous plaît regardez prendre cette DLL?" :)
Pouvez-vous traduire « Cíl vyvolání způsobil výjimku. »? –
Je suis désolé :) J'ai oublié. Corrigée. – Simon