Hello, In order to keep on having more meaningful exception, one could try the following refactoring :
-Extracting private method PersistenceSpecification.CreateInstance() into some helper class (maybe InvocationHelper) public static object CreateInstance(Type type) { var constructor = ReflectHelper.GetDefaultConstructor (type); if (constructor == null) throw new MissingConstructorException(type); return constructor.Invoke(null); } public static T CreateInstance<T>() { return (T)CreateInstance(typeof (T)); } -Make addMappingsFromAssembly(Assembly assembly) rely on it instead of using Activator.CreateInstance(type). Incidentally, this would fix issue 83 ;-) Cheers, Em. Note: MissingConstructorException class would however have to be moved to FluentNHibernate project Note 2: Maybe using the type.FullName instead of type.Name might help to find the class to fix when dealing with a huge solution with different data access layer projects Note 3 : Thanks for the awesome work you've performed --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---