Can't find NHibernate.Expression

Topics: Developer Forum, User Forum
Jan 3, 2009 at 6:40 PM


I thought I had downloaded everything that I needed to build the NSK project but I am getting an error on





I don't see Expression as an option following NHibernate. I'm sure that I'm just missing something simple. Please help.

Jan 4, 2009 at 8:58 PM

I found that version 2.0 of NHibernate (which is the one which NSK uses) changed the name of NHibernate.Expression to NHibernate.Criterion. After making this change I was able to get most of the MSTests unit tests to run. There is a problem with AddressInfo in employee.AdressInfo.* for the 4 tests in employeeTestCase.cs (AddressAssignment, CityAssignment, RegionAssignment and PoatalCodeAssignment). I got these tests to work by making a contructor for the employee class that news up a AddressInfo object:


public Employee()




    this.AddressInfo = new AddressInfo();



I got all the unit tests working except for the ManagedDesigns.NorthWind.Web.Monorail.Test tests since they are all looking for the app.config to contain "castle" information. I'm not sure how this is supposed to work in the app. I've marked these as Ignore to skip them at this point.

I now can run the WPF app (which is what I wanted to look at first) but when I try to see the View | Customers using the menu item, I get an error when the DataAccesProviderFactory is trying to do the


activeProvider =



I get an exception:

{"Could not load file or assembly 'ManagedDesigns.Northwind.Data.Hibernate' or one of its dependencies. The system cannot find the file specified.":"ManagedDesigns.Northwind.Data.Hibernate"}

Has anyone else seen any of these errors or is everything running fine for everyone else?

thanks in advance!


Jan 4, 2009 at 9:01 PM
BTW - I wanted to say - Thanks for this excellent application!! There isn't alot of good info out there with good samples using WPF/NHibernate/DDD with unit tests and all these goodies. Many thanks for making this available!

Jul 1, 2009 at 3:00 PM

Hi Bill

      Have you resolved the exception problem?  If you have, could you post the solution?  I got the exact same exception.