mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Update custom database bug
This commit is contained in:
@@ -527,7 +527,19 @@ namespace SqlSugar
|
||||
var newAssembly = new ReflectionInoCacheService().GetOrCreate<Assembly>(key, () => {
|
||||
try
|
||||
{
|
||||
return Assembly.LoadFrom(CustomDllName + ".dll");
|
||||
var path = Assembly.GetExecutingAssembly().Location;
|
||||
if (path.HasValue())
|
||||
{
|
||||
path =System.IO.Path.Combine( System.IO.Path.GetDirectoryName(path), CustomDllName + ".dll");
|
||||
}
|
||||
if (path.HasValue() && FileHelper.IsExistFile(path))
|
||||
{
|
||||
return Assembly.LoadFrom(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Assembly.LoadFrom(CustomDllName + ".dll");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
Reference in New Issue
Block a user