Export to GitHub

roundhouse - issue #59

KeyNotFoundException in NHibernateSessionFactoryBuilder


Posted on Nov 20, 2011 by Happy Rabbit

I'm using roundhouse and I'm very happy with the result. When I've started using it, I had one simple problem. For some reason, my output dll was copied with the extension ".DLL" (in uppercase), instead of ".dll". And, when Roundhouse tried to find the Database class type, it broke. Becouse of this code: In ApplicationParameters class. In get_merged_assembly_name method. In this piece of code: Assembly .GetExecutingAssembly() .Location .Contains("roundhouse.dll")

As my assembly was called roundhouse.DLL, the method returned "rh" as the merged assembly name and the NHibernateSessionFactoryBuilder could not find the right string type in the dictionary.

I fix it in my local version of Roundhouse code by simply adding the ToLower method: Assembly .GetExecutingAssembly() .Location .ToLower() .Contains("roundhouse.dll")

Only FYK (maybe it will help another user), I had another annoying issue, but it was becouse of my own project. I'm using Nhibernate too, and, when I've added RoundHouse to my project, msbuild started showing assembly conflicts. I could solve it by many different manners, but I've resolved to merge all the Roundhouse dependencies in one simple file with ilmerge.

Thanks, Felipe.

Comment #1

Posted on Nov 20, 2011 by Happy Panda

Thanks for reporting this. I will definitely look into getting this added to the code base.

Comment #2

Posted on Nov 27, 2011 by Happy Panda

(No comment was entered for this change.)

Comment #3

Posted on Nov 27, 2011 by Happy Panda

You were able to internalize all nhibernate items and roundhouse still worked? There is a reason that a few of the files are not internalized during the ilmerge.

Comment #4

Posted on Nov 27, 2011 by Happy Panda

Fixed in revision 361.

Comment #5

Posted on Nov 27, 2011 by Happy Panda

(No comment was entered for this change.)

Comment #6

Posted on Nov 27, 2011 by Happy Panda

(No comment was entered for this change.)

Comment #7

Posted on Nov 29, 2011 by Happy Rabbit

Yes! I merged all dlls and roundhouse worked as expected! RH found the database and ran all sql files for the first time. After, everytime I ran, it worked fine, checking the runscripts table and running only new files. Thanks for the fix!!

Status: Fixed

Labels:
Type-Defect Priority-Medium Milestone-Release0.8.5