Could not create the driver from
NHibernate, Version=184.108.40.20600, Culture=neutral,
The IDbCommand and IDbConnection implementation in the assembly 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 element in the application configuration file to specify the full name of the assembly.
This is the error I get when I try to use fluent nHibernate!
I try the simple examples by the configuration doesn't work well with local database
using this dlls.
private static String ConnectionString = "Data Source = Database1.sdf";
public static ISessionFactory CreateSessionFactory()
.Mappings(m => m.FluentMappings.AddFromAssembly(System.Reflection.Assembly.GetExecutingAssembly()))
.ExposeConfiguration(x => x.SetProperty("connection.release_mode", "on_close"))
private static void BuildSchema(Configuration configuration)
SchemaExport schemaExport = new SchemaExport(configuration);
schemaExport.Execute(false, true, false);
Thank you! It's very important!
i found that it break in the buildsessionfactory...helpppp!!!!
Are you sure you do have Version=220.127.116.1100 of NHibernate in your bin directory? It looks like you have a different build of NHibernate in your bin directory.
If you sure it is there, check if your references are correct:
Do you have a reference in your project to:
This is located in the following dir:
"C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop\System.Data.SqlServerCe.dll"
Make sure you have:
"Copy Local" to true.