Getting NHibernate Query Analyzer to work

Everytime I try and get Ayende’s NHibernate Query Analyzer to work I seem to encounter some weirdness. Here’s what I did to get it running this time.

  1. Download the version appropriate to your version of NHibernate. For me, that was 1.2GA
  2. Create a new app.config file, and into it place just the NHibernate configuration section and the appropriate settings. Note that when I tried it, NQA didn’t like the <hibernate-configuration> notation for the hibernate section, instead I had to change it to use the <nhibernate> notation.
  3. Load up NQA and start a new project.
  4. Add the app.config file you created and the assemblies which contain your embedded HBM files.
  5. Hit Build Project. IMPORTANT! If you see any errors, then quit NQA, fix the errors, and start again. If you leave NQA running and try again you’ll see the same error message as it seems NQA doesn’t close the old app domain properly.
  6. If all that works, then your home dry. File, New Query, and off you go. Brilliant tool once it’s going.