NHibernate and Intellisense

NHibernate is OR mapping tool for Microsoft’s .Net platform. It is used to map an object-oriented domain model to a relation database. It also includes features to query and retrieve data. The mapping files are in XML format and it can be a bit hard to know the syntax. Luckily there is support for Intellisense in Visual Studio, which makes it much easier to work with the mapping files. Here is how I set it up for NHibernate 2.1.2 and Visual Studio 2008.

1) Copy the files nhibernate-configuration.xsd and nhibernate-mapping.xsd from the Required_Bins folder in the NHibernate distribution directory.

2) Paste them into C:\Program Files (x86)\Microsoft Visual Studio 9.0\Xml\Schemas.

3) Restart Visual Studio.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.