Could not compile the mapping document:

Mar 1, 2010 at 5:13 PM

All my attempts to execute the command result in the following error

Error encountered: Could not compile the mapping document: IBH.Data.Content.NHibernateMaps.TextType.hbm.xml


The command I executed is as follows

nst /c:hibernate.cfg.xml /a:IBH.Data.Content.dll


Error encountered: Could not compile the mapping document: IBH.Data.Content.NHib


Mar 3, 2010 at 2:18 PM


A few questions:


1. Does the application itself have a problem loading/using that mapping file?

2. What version of NHibernate are you using?

3. I am assuming based on the command you executed that the mapping files are embedded resources in the IBH.Data.Content.dll

4. Any chance you could post the mapping document?

Oct 26, 2010 at 4:28 PM
Edited Oct 27, 2010 at 6:53 AM


I'm getting the same error.

When I use the schema tool programatically:


            new SchemaExport(ObjectFactory.GetInstance<Configuration>()).Execute(false, true, false);


I have no problems to generate the database and the application is working as expected.

I'm using NHibernate version

Please see the mapping:


<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" auto-import="true" default-cascade="none">
<class xmlns="urn:nhibernate-mapping-2.2" mutable="true" name="adMoto.Core.Nh.ExchangeRates, adMoto.Core" table="`ExchangeRates`">
<id name="Id" type="System.Int32">
<column name="Id" />
<generator class="identity" />
<property name="Conversion"/>
<property name="Symbol"/>
<property name="MidRate"/>
<many-to-one class="adMoto.Core.Nh.ExchangeTable, adMoto.Core" name="ExchangeTable" cascade="none">
<column name="ExchangeTableId" />