From 13616d682da5272335d2b59026e587c13e86312f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=A3Sir?= <121106945@qq.com> Date: Tue, 31 Mar 2026 13:57:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=A8=E6=80=81=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=97=B6=EF=BC=8C=E7=89=B9=E6=80=A7IFoxInitialize?= =?UTF-8?q?=E5=8F=8A=E6=8E=A5=E5=8F=A3IFoxAutoGo=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E5=B7=A5=E4=BD=9C=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CADShared/Initialize/IAutoGo.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CADShared/Initialize/IAutoGo.cs b/src/CADShared/Initialize/IAutoGo.cs index c9f1d74..b02cfe2 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") // 通讯库 -- Gitee