Commit 5d16f9d8 authored by 潘栩锋's avatar 潘栩锋 🚴

模块先查找本地,再找文件,方便调试

parent 79e1c181
......@@ -118,7 +118,21 @@ namespace FLY.UI.Module
foreach (UIModuleParam mp in mplist)
{
Assembly assembly = Assembly.LoadFrom(mp.dll_filename);
//先加载本地,找不到,再加载文件
Assembly assembly=null;
try
{
assembly = Assembly.Load(mp.assembly_name);
}
catch (Exception e)
{
assembly = Assembly.LoadFrom(mp.dll_filename);
}
if (assembly == null)
{
//加载失败!!!
continue;
}
Type type = assembly.GetType(mp.assembly_name + "." + mp.class_name);
if (type == null)
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment