This tutorial writing your first nhibernate is a good tutorial but it misses out certain steps. Here are the missing steps.
1. In shareLib folder, copy Nhibernate (download first) and NUnit(download first). Then add references to nhibernate.dll and nunit.framework.dll to your project.
2. It does not specifically talk about SQL Server Compact Driver. The reference can be found in “Assemblies”. Type SQL and look for assembly System.Data.SqlServerCE at the bottom.
3. The parameters to new SchemaExport(cfg).Execute(false, true, false, false); are wrong. It should be 3 parameters.