views:

745

answers:

4

It now makes sense that the versions aren't right.

I know I am using Castle Windsor 2.0 and I would like to use NHibernate with Fluent NHibernate - what versions do I need of these two?

Edit Ok, I think I got it wired up. I'm still having a version issue. I now get this error when using the direct download from their site. The only library at 1.0.3 is the NHibernateFacility.

{"Could not load file or assembly 'Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc"}

Old Problem

Why would I be getting this?

Method '{MethodName}' in type 'Class' from assembly '{ClassLibrary}, Version=1.0.0.0, Culture=neutral, PublicKeyToken=' does not have an implementation.

It compiles just fine and it is implemented. I don't even call that the class yet.

I am using IoC - Castle Windsor with Fluent NHibernate.

The interface I have to implement is Castle.Facilities.NHibernateIntegration.Internal.IConfigurationBuilder

+1  A: 

There's probably a versioning conflict. Try getting the Castle and NH assemblies from the Castle build server.

Mauricio Scheffer
What about fluentnh?
Daniel A. White
And how do you download from there?
Daniel A. White
re: fluentnh: get the fluentnh sources and build against the nh dll included with castle.re: downloads: check the "artifacts" links
Mauricio Scheffer
I did this and I believe I get the same problem.
Daniel A. White
check out http://mikehadlow.blogspot.com/2009/01/integrating-fluent-nhibernate-and.html
Mauricio Scheffer
also http://www.orbitone.com/en/blog/archive/2009/06/23/adding-fluent-nhibernate-support-for-castle-windsor’s-nhibernate-integration.aspx
Mauricio Scheffer
i updated to reflect my current problem.
Daniel A. White
did you get the binaries from the build server? did you check the blogs I mentioned?
Mauricio Scheffer
Thanks - i got the release build initially. but im using the developent version and it works beautifully! thanks for your help!
Daniel A. White
A: 

Two possibilities:

Most likely: You have an outdated dll in the chain - Somewhere you have updated an assembly but not all of the library assemblies it requires. Update your whole toolchain and verify the versions are correct.

Or:

You are referencing assembly "Alpha.dll", and calling something in it that exposes a type in assembly "Beta.dll". Alpha references Beta, but your assembly only references Alpha.

In this case, you will get the above error message. Most of the time you get this problem, you'll see a clearer message, (Add reference to Beta), but this happens sometimes. If you figure out when, let me know! To fix it, simply add a reference to Beta.

Philip Rieck
A: 

Most likely it is version conflict, but I got this error while experimenting with MEF. While coping extensions to separate folder I forgotten about some dependant library. While trying to load extension this error was shown. To find out which library was missing I attached to AssemblyResolve event on current appdomain:

System.AppDomain.CurrentDomain.AssemblyResolve += ...

If you do so you will get information about assembly name and version that failed to load.

Rafal Furman
+1  A: 

You could check out the Horn project (http://code.google.com/p/hornget/ ). It will allow you to build castle, nhibernate and fleunt nhibernate and they should all work together.

It is in pre beta but the code is pritty solid and i've been using it for about the last month of two.

Colin G

Colin G
Sadly , Hornget isn't supported anymore.
Francois Botha