Do I need to create my own build of nHibernate and tools if i want to use the following frameworks in 1 project.
nHibernate
nHibernate Validators
Fluent NHibernate
xVal NHibernate Provider
nHibernate Linq
I am getting "Could not load file or assembly 'NHibernate," errors which I believe is because each framework is built against a different version of nHibernate?
Downloaded 2.0 versions of everything solved this.
Silly me!
Related
Where to find binary for fluent nhibernate. This page is changed now http://www.fluentnhibernate.org/ and i can't find any binary in it.
Is fluent nhibernate still alive and where can i get binary code?
You can dowload it with nuget.
http://nuget.org/packages/FluentNHibernate/1.3.0.717
You can download the latest Fluent NHibernate package if you are using NuGet and this is compatible with the latest version of NHibernate (3.3.0.4000). If you aren't using NuGet I highly recommend it.
I'm trying to migrate from NHibernate 2.1 to NHibernate 3.1. The FluentNHibernate 1.2 download contains lots of NHibernate dlls, as if it is trying to bundle everything required for NHibernate. But it doesn't seem to contain log4net. Does anyone know why? Is there something I'm missing here? Is log4net not strictly necessary?
Edit: it also doesn't contain the bytecode providers for LinFu or Spring, only Castle. Is there a reason for that too?
NHibernate 3.1 does not require log4net. If uses it if available.
Also, it includes its own bytecode provider, so the external ones are not needed anymore either.
As of the today, the Nuget release of NHibernate Validator is 1.3.1.4000 and says it has a dependency >= NHibernate 3.1.0.4000, which implies it should work with latest NHib 3.2.
But NHib 3.2 now has its own ProxyFactory, so running the two gets the following error:
System.TypeLoadException : Could not load type 'NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException' from assembly 'NHibernate, Version=3.2.0.2001, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'
I do not really need anything in NHib 3.2 now, although my preference would be to make the two work together.
Alternatively, I suppose I could drop down to NHib 3.1, but my solution has 16 projects, which where Nuget comes in. This post suggests how to get and install an older package release, but NHib 3.1 doesn't seem to be available stand alone from Nuget.
Installing Validator alone using Nuget will install the NHib 3.1 as a dependency. I have some projects that don't use Validator but do use NHib alone, and I guess I could install Validator just to get the correct dependency but that isn't a very satisfying solution.
Has anyone got the latest NHib (3.2) working with the latest NHib Validator? Suggestions?
Cheers,
Berryl
If you feel OK about using NHib 3.1 you can first add the Validator + its dependency on NHib 3.1 to the projects that require validation. Afterwards, referencing the NHib package in other projects can be done at the solution level (introduced in NuGet 1.4)
I'm using the latest stable build of Fluent NHibernate ver 1.1. Now in the application I'm also using castle.core for dependency injection. Now the problem is using them together. In Visual Studio castle.core says ver. 2.5.1.0 but in Windows Explorer "details" for the same DLL file it says 2.5.1.2121. I have tried both numbers in assembly binding in the web.config, to switch away from ver. 1.1.0.0 which the Fluent NHibernate castle.core references, but not with much luck.
Any suggestions to solve this issue? I do not want to build any of the assemblies myself.
The only solution I came across with this was to get the nhibernate.bytecode.castle source and build it against the latest source for castle.core - alternatively you could use a nhibernate.bytecode.linfu instead.
I rebuilt Fluent NHibernate against the latest Castle Project core and Fluent NHibernate beta2. Now it works.
I just found the solution. I used the MVC contrib project and this was the source to the problem, the Windsor controller factory. I wrote my own and removed the reference, only a few lines of code, problem solved.
Hy
We want to use the latest alpha version of NHibernate. Unfortunately the latest fluent nhibernate release is built for 2.1 GA. When do you plan to upgrade to latest NH? Is there a source tree which I can fork to build the latest version from?
Daniel
You can get it using NuGet.
You could try to download their latest binaries from Git here and build against NH3 assemblies (it includes a project file where you would just need to update references from 2.1 to 3).. but probably they already did that in "Unstable/future binaries".
Get the latest source code for fluent nhibernate and change the references from 2.1.2 to 3.0 and recompile the fluent nhibernate code.
You also can put AssemblyRedirect and use Fluent with latest Nhibernate. Fluent generates XML mappings, so everything should be fine.