Take the 2-minute tour ×

I'm trying to follow the NHibernate tutorial, "Your first NHibernate based applicaton:Revision #4" at NHibernate Forge.

But the line: new SchemaExport(cfg).Execute(false, true, false, false);

Will not compile because it says there is no overload that takes four boolean paramaeters!

I am using NHibernate 2.1.2 in Visual Studio 2008 C#. All the samples I have seen clearly use this call with four boolean parameters. Has something changed in the latest version of NHibernate with the call to SchemaExport()?

I am trying to create a simple table in my database in a test method. I am using MS SQL Express 2008 as my database. I have tried the Create(true, true) call and it at least compiles and runs, but the table never seems to persist in the database.

share|improve this question

1 Answer 1

Yes, it changed from NH2.0.xGA to NH2.1.0. It used to be:

void Execute(bool script, bool export, bool justDrop, bool format)

Now it's:

void Execute(bool script, bool export, bool justDrop)

so just remove the format parameter. This was replaced by the format_sql config property:


Here's the corresponding issue.

share|improve this answer

Your Answer


