//Formatting is not properly done.
Using nopcommerce plugins written in nhibernate and .net core, each plugins contains its own entities directory, but when NHibernate configuration fails
var cfg = new Configuration();
cfg.Configure(CommonHelper.MapPath("~/App_Data/db/defauls.config"));
// error here
cfg.AddAssembly("plugins assembly name");
FileNotFoundException: Could not load file or assembly 'plugins assembly name' or one of its dependencies. The system cannot find the file specified.
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, string codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, ref StackCrawlMark stackMark, IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks) MappingException: persistent class "plugins assembly name.Entities.class name, plugins assembly name not found
NHibernate.Cfg.XmlHbmBinding.Binder.ClassForFullNameChecked(string fullName, string errorMessage) MappingException: Could not compile the mapping document: plugins assembly name.Entities.class name.hbm.xml
NHibernate.Cfg.Configuration.LogAndThrow(Exception exception)
Assume Plugin.Shop.dll is placed in root folder of plugin Plugin.Shop.Entities folder. From property select content type as Embedded Resource and give reference of this DLL and from property set it False to copy out folder.
This is EmbeddedAssembly.cs file
This is Dependency Register File