C#C
C#3y ago
reeeeeee

✅ Problems with NHibernate, FluentNHibernate, StructureMap

I have been trying to fix this bug in an older project (which needed to be updated to .net framework 4.6.1, because of some other newer libraries), but I just didn't really make any progress.

I will post some of the stack trace, but please let me know what else should I include (except whole project, lol), so it would be easier to help.

FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.


System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at FluentNHibernate.AssemblyTypeSource.GetTypes()
   at FluentNHibernate.PersistenceModel.AddMappingsFromSource(ITypeSource source)
   at FluentNHibernate.Cfg.FluentMappingsContainer.Apply(PersistenceModel model)
   at FluentNHibernate.Cfg.MappingConfiguration.Apply(Configuration cfg)
   at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration()
   --- End of inner exception stack trace ---
   at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration()
   at TimeSpace.DataAccess.Persistence.Configuration.NHDatabaseConfiguration.CreateConfiguration()
   at TimeSpace.DataAccess.Persistence.Configuration.NHDatabaseConfiguration.CreateFactory()
   at TSTrumpet.Web.DataAccessRegistry.<>c.<.ctor>b__1_0(IContext ctx) in C:\Users\naczup\tstrumpet\TSTrumpet.Web\DataAccessRegistry.cs:line 26
   at StructureMap.Pipeline.LambdaInstance`1.build(Type pluginType, BuildSession session)
Was this page helpful?