NHibernate reference in the query domain (Custom driver)

edited July 2012
Following the Astoria example I've tried building a dynamic NHibernate driver.

The schema gets generated nicely (generated from the NHibernate metadata), and if attach the VS debugger I can see that the dynamic typed datacontext is compiled with no errors.

If I then run a query, I get a "type or namespace could not be found" exception. I'm guessing this is because the dynamic assembly containing the UserQuery cannot be compiled, but I'm not sure, as there is nothing in the AppData\Local\LINQPad\Logs\log.txt. Explicitedly adding a reference to NHibernate and my Poco assembly through F4 fixes this issue. (I've also tried sprinkling LoadAssemblySafely more or less all over the place to no avail)

However, since both NHibernate.dll and my Poco assembly are already in the driver folder, I believe this shouldn't be necessary? The documentation seems to suggest this.

Any thoughts on how to tackle this? (Since I'd really like my driver to just be 1-click & go)


Sign In or Register to comment.