dengjunjie
2024-12-05 46e98339480d853fc78a014c34d7ff9fcaf13890
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs
@@ -1,7 +1,7 @@
using Autofac;
using Autofac.Extras.DynamicProxy;
using log4net;
using Microsoft.Extensions.DependencyModel;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -21,6 +21,7 @@
        //private static readonly ILog log = LogManager.GetLogger(typeof(AutofacModuleRegister));
        protected override void Load(ContainerBuilder builder)
        {
            var basePath = AppContext.BaseDirectory;
            var cacheType = new List<Type>();
            builder.RegisterType<LogAOP>();
@@ -41,7 +42,14 @@
            {
                try
                {
                    assemblyList.Add(AssemblyLoadContext.Default.LoadFromAssemblyName(new AssemblyName(library.Name)));
                    string path = Path.Combine(basePath, $"{library.Name}.dll");
                    if (!File.Exists(path))
                    {
                        var msg = $"{library.Name}.dll丢失,因为项目解耦了,所以需要先F6编译,再F5运行,请检查 bin æ–‡ä»¶å¤¹ï¼Œå¹¶æ‹·è´ã€‚";
                        //log.Error(msg);
                        throw new Exception(msg);
                    }
                    assemblyList.Add(Assembly.LoadFrom(path));
                }
                catch (Exception ex)
                {