Building against NHibernate 2.0GA or 2.1(trunk)

21 views
Skip to first unread message

Chad Myers

unread,
Dec 26, 2008, 11:08:53 PM12/26/08
to fluent-n...@googlegroups.com

This came up again today, and I wasn’t sure if everyone was aware of it.

 

Fluent NHibernate can build against NHibernate 2.0 (release) or the 2.1 (trunk).

 

It will swap out the binaries in the tools/NHibernate folder to the appropriate version.

 

This means two things:

 

1.)    Doing a re-build solution in VS2008 will pick up the different version of the binaries (most of the time)

2.)    Doing a compile task from Rake will build against the current version of the binaries

 

 

There are two tasks in the Rake script you should know about:

 

> rake use_nhib_20
> rake use_nhib_21

 

These internally call the “switch_nhib_libs(…)” method (i.e. switch_nhib_libs(‘nhib2.0GA’))

 

As new versions come out (let’s say nhib_22GA), simply add a new task to the Rake script:

 

desc “… description …”

task :use_nhib_22 do

                switch_nhib_libs(‘nhib2.2GA’);

end

 

 

Then make sure you put the NHibernate 2.2GA binaries into the tools/NHibernate/nhib2.2GA  folder.

 

-Chad

Steve Mason

unread,
Dec 27, 2008, 8:19:29 AM12/27/08
to fluent-n...@googlegroups.com
Thanks Chad.  It may also be worth adding that if you want a version of FNH compiled against NH 2.1 then you need to run "rake nhib21", otherwise the RakeFile will copy the 2.0 binares before building and compile against those instead.

Also, how often are the 2.1 binaries that come in the Fluent NHibernate Trunk updated?  Is it worth building my own from the current NHibernate trunk?



2008/12/27 Chad Myers <ch...@chadmyers.com>

Chad Myers

unread,
Dec 27, 2008, 10:42:13 AM12/27/08
to fluent-n...@googlegroups.com
Good point. Thanks!

Re: updated - not often. They could use one. I'll try to do that this weekend unless someone else wants to.

Also, it looks like Fabio and team released 2.01 (congrats!) and I dont think we have that either.

I was thinking about making it easier for folks to build against their own version of nhib (a branch, local modifications, etc) so they could say "rake use nhib_custom" or something and it would try to build against those nhib binaries.


----------------------
Sent from my phone. Please excuse typos and extra characters

Steve Mason

unread,
Dec 28, 2008, 7:30:03 AM12/28/08
to fluent-n...@googlegroups.com
Well I went out yesterday and built myself a version of the latest Trunk that works fine with FNH.  However there are some breaking changes with the new ProxyFactory generator features which mean that for the Unit Tests to pass you need to update the configurations and copy an extra DLL.

This obviously kinda breaks the "Just copy the DLLs and it'll work" point of the Rake task.

More info on the ProxyFactory(Factory) stuff here: http://nhforge.org/blogs/nhibernate/archive/2008/11/09/nh2-1-0-bytecode-providers.aspx



2008/12/27 Chad Myers <ch...@chadmyers.com>
Reply all
Reply to author
Forward
0 new messages