Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Derik Whittaker

Thoughts on Software Development, .Net, OOP, Design Patterns and all things cool



NHibernate Newbie Needs Help

See my comments below.... Figured out what stupid thing i was doing... :( 

 

All, I am trying out NHibernate for the first time and I am having some troubles getting it up and running.  I have downloaded the sample app from Hibernate.org and started to look at it as well as other samples from the net.

When I try to config NHibernate in my own application I get an error while trying to load an Assembly with the * .hbm.xml files.  Yes I do have that file marked as an embedded resource.

The error I am getting is the following:

System.IO.FileNotFoundException: Could not load file or assembly 'Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The system cannot find the file specified.


at NHibernate.Cfg.AssemblyHbmOrderer.GetHbmFiles()
at NHibernate.Cfg.Configuration.AddResources(Assembly assembly, IList resources, Boolean skipOrdering)
at NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly, Boolean skipOrdering)
at NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly)
at NHibernate.Cfg.Configuration.AddAssembly(String assemblyName)

 

I am using version 1.2.0.4000 of NHibernate and have the following assembles in my output folder.

Castle.DynamicProxy.dll

1.1.5.0

Iesi.Collections.dll

1.0.0.3

log4net.dll

1.2.10.0

NHibernate.dll

1.2.0.4000

Nullables.dll

1.2.0.4000

 
Now according the example’s readme I need the HashCodeProvider.dll and iTextSharp.dll assemblies, is this true?  What versions?  Where can I find them?

Here is the code causing the issues.


Can anyone help me with this?



Comments

badgrs said:

The only difference between that and my /Bin folder is I also have Nullable.NHibernate.dll No idea if that matters or not, sorry I can't be more help I'm only starting out myself!

# June 4, 2007 10:48 AM

Derik Whittaker said:

Badgrs,

I added that assembly and nothing.  Still fails.  

Next idea?  Help

# June 4, 2007 10:56 AM

Derik Whittaker said:

Ok,

I feel like a dumb ass.  I have all my projects outputting to a single directory.  The one with all the NHibernate assembly's.  Turns out that the test project was NOT outputting to that directory....thus explaining the File Not Found exception.....

I will the dumb ass of the day award...

# June 4, 2007 8:18 PM

PartialClass said:

it happens some times. Specially, when u r working on some thing new and complex

# June 5, 2007 2:28 PM

hector said:

how you can add a new assembly?

i was trying to implement role provider, but don't work

# September 17, 2008 10:05 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Derik Whittaker

Derik is a .Net Developer/Architect specializing in WinForms working out the northern suburbs of Chicago. He is also believer and advocate for Agile development including SCRUM, TDD, CI, etc.

When Derik is not writing code he can be found spending time with his wife and young son, climbing on his bouldering wall, watching sports (mostly baseball), and generally vegging out. Check out Devlicio.us!

Our Sponsors

Proudly Partnered With


This Blog

Syndication

News