mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Update custom database bug
This commit is contained in:
@@ -527,7 +527,19 @@ namespace SqlSugar
|
|||||||
var newAssembly = new ReflectionInoCacheService().GetOrCreate<Assembly>(key, () => {
|
var newAssembly = new ReflectionInoCacheService().GetOrCreate<Assembly>(key, () => {
|
||||||
try
|
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
|
catch
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user