© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
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.
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)
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)
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

❔ StructureMap.StructureMapException: StructureMap Exception Code: 207
C#CC# / help
3y ago
Problems with scenes
C#CC# / help
2y ago
❔ Problems with colliders...
C#CC# / help
4y ago
Problems with Repository Pattern
C#CC# / help
7mo ago