Tuesday, March 27, 2012

Using NHibernate and related libraries in commercial projects

I like open source and try to take part in OSS ecosystem by supporting several own projects and contributing patches and fixes in projects which I used in my work. However if you live in enterprise development world you should care about licensing questions and before to decide which library or component you will use for proprietary software we should check does it contain compatible license.

Some time ago I made investigated licensing of NHibernate and it’s related projects which reveal all power of this ORM and make it more effective and productive: Fluent NHibernate and Linq 2 NHibernate. I decided to put this information into my blog because I know how licensing issues may be boring for developers and this info may also be useful for other people.

First of all about versioning. At the moment when I checked it (end of 2011) the following versions were available:

Fluent NHibernate 1.1 depends on NHibernate 2.1.2.4000
Linq 2 NHibernate 1.0.0.4000 -> NHibernate 2.1.0.4000
Linq 2 NHibernate 1.1.0.1001 -> NHibernate 2.1.2.4000

(There was lack of support of NHibernate 3.x in related projects). You may use other versions and use assembly binding redirection of course. In the table above I showed versions which were used for compilation of particular projects, i.e. if you will use them – you won’t have problems with compatibility. So it is possible e.g. to use NHibernate 2.1.2.4000, Fluent NHibernate 1.1 and Linq 2 NHibernate 1.1.0.1001 in the project without additional configurations. Now about licensing.

Library License
NHibernate GNU Lesser General Public License. This license allows to use library both in OSS and in commercial software.
Fluent NHibernate BSD license. It also allows to use it in commercial software. Plus according to the license text from project repository you should provide its license.txt with your application.

Linq 2 NHibernate

It is part of NHibernate contrib project which is also under LGPL, which allows to use it in commercial software.

So as summary you may use NHibernate and 2 mentioned projects in commercial software, except the cases when there are special conditions from the customers which may prevent to use that.

1 comment: