diff --git a/BCVP.Net8.Extensions/ServiceExtensions/AutofacModuleRegister.cs b/BCVP.Net8.Extensions/ServiceExtensions/AutofacModuleRegister.cs index 7d18998..d9328ca 100644 --- a/BCVP.Net8.Extensions/ServiceExtensions/AutofacModuleRegister.cs +++ b/BCVP.Net8.Extensions/ServiceExtensions/AutofacModuleRegister.cs @@ -20,9 +20,9 @@ public class AutofacModuleRegister : Autofac.Module protected override void Load(ContainerBuilder builder) { var basePath = AppContext.BaseDirectory; - - var servicesDllFile = Path.Combine(basePath, "BCVP.Net8.Service.dll"); - var repositoryDllFile = Path.Combine(basePath, "BCVP.Net8.Repository.dll"); + var dllProjectName = Assembly.GetEntryAssembly()?.GetName().Name; + var servicesDllFile = Path.Combine(basePath, dllProjectName + ".Service.dll"); + var repositoryDllFile = Path.Combine(basePath, dllProjectName + ".Repository.dll"); var aopTypes = new List() { typeof(ServiceAOP), typeof(TranAOP) }; builder.RegisterType();