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.
- Download the version appropriate to your version of NHibernate. For me, that was 1.2GA
- 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.
- Load up NQA and start a new project.
- Add the app.config file you created and the assemblies which contain your embedded HBM files.
- 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.
- If all that works, then your home dry. File, New Query, and off you go. Brilliant tool once it’s going.