diff --git a/src/CADShared/Initialize/IAutoGo.cs b/src/CADShared/Initialize/IAutoGo.cs index c9f1d749285af6c9d74f6ea13c0556bf00eeb2ae..b02cfe279480ba99a6397b9c0c04da1885f6f4dc 100644 --- a/src/CADShared/Initialize/IAutoGo.cs +++ b/src/CADShared/Initialize/IAutoGo.cs @@ -1,4 +1,4 @@ -namespace IFoxCAD.Cad; +namespace IFoxCAD.Cad; using System.Diagnostics; @@ -184,7 +184,10 @@ public static void AppDomainGetTypes(Action action, string? dllNameWithout { // 获取类型集合,反射时候还依赖其他的dll就会这个错误 // 此通讯库要跳过,否则会报错. - var location = Path.GetFileNameWithoutExtension(assembly.Location); + var assemblyLocation = assembly.Location; + var location = !string.IsNullOrEmpty(assemblyLocation) + ? Path.GetFileNameWithoutExtension(assemblyLocation) + : assembly.GetName().Name; if (dllNameWithoutExtension != null && location != dllNameWithoutExtension) continue; if (location == "AcInfoCenterConn") // 通讯库