This could happen because of any NHibernate specifics like attributes or other artifacts used somewhere in your domain classes.
I would suggest you to remove the NHibernate reference from your data layer project and then build and fix all errors because of the missing reference. In genera the fix should be removing the remaining artifacts. After that you should be able to compile without any issues.
The reason for this error is that the Enhancer tool
is trying to instantiate the FluentMetadataSource class to retrieve the configuration to make the classes persistent accordingly. The exception is in the System.Reflection.RuntimeModule.GetTypes() which means that some of your classes still need the NHibernate reference.
I hope this helps. Should you have any other questions do not hesitate to get back to use.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map