I'm building a new project of azure function in visual studio. target .net framework (v1) because i reference .net framework project.
Is there a binding issue in azure functions?
I reference my own dll and in that dll i reference nhibernate (5.0.3) nuget package and fluent nhibernate package(2.1.0). When i the code on runtime is build my unit of work i'm getting
FluentNHibernate.Cfg.FluentConfigurationException
HResult=0x80131500
Message=An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
Source=FluentNHibernate
StackTrace:
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
at Cloudents.Infrastructure.Framework.Database.UnitOfWorkFactory..ctor(String connectionString) in C:\Users\Ram\source\repos\Zbox\Cloudents.Infrastructure.Framework\Database\UnitOfWorkFactory.cs:line 15
Inner Exception 1:
FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
Inner Exception 2:
SerializationException: Unable to find assembly 'FluentNHibernate, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'.
I'm not sure why the code is trying to get assembly version that i dont have. i tried to put automatic binding but no luck. I tried to upload my code to azure but same error.
Any help how to solve this? I'm using the same code in azure web job and the code works.
User contributions licensed under CC BY-SA 3.0