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.
Advertisements

4 thoughts on “Getting NHibernate Query Analyzer to work

  1. David Brett says:

    Hi,

    Glad to see I’m not the only one trying to get this tool running. Your comments have enabled me to pass the build stage but I still can’t run a query.

    Always the same message : “in expected : (possibly invalid or unmapped class…”

    I’m wondering if my app.config is ok. Any chance I could see how you configured yours.

    This tool looks great if only i could get it to work!

    Cheers,

    David BRETT

  2. David Brett says:

    Hi Al,

    thanks for your rapid reply however only the first line of your app.config file appeared in your answer.

    I have however now got the Analyzer working correctly.
    In my query I had omitted to refrence my classes using the appropiate namespace.

    Thanks anyway,

    David

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s