Since fluent is just everywhere, I thought that I would have to go the fluent NHibernate road as well. Turned out to be quite wacky.
First of – I just wrapped up all my referenced assemblies: Castle Windsor 2.0 (which is actually internally labeled as 1.1) as well as all the other stuff and NHibernate 2.1 GA. Then adding the new kind in town: Fluent NHibernate.
And this is where the trouble begins … Fluent NHibernate is build against 220.127.116.1100 of NHibernate (= 2.1 GA). This is good, since I just downloaded this exact version. But wait – what’s my most favorite NHIntegrationFacility doing there – it’s actually linked against 18.104.22.1683. So this screws me off.
OK – don’t panic! Fortunatly .Net has the ability to redirect assembly bindings. Just a little bit of tweaking in the
app.config does the trick:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" /> <bindingRedirect oldVersion="22.214.171.1243" newVersion="126.96.36.19900"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration>