fix System.Reflection.Assembly.GetCallingAssembly().Location return empty string when publish single file

main
Chasel 2022-12-06 17:35:31 +08:00
parent 33b7f25fd4
commit 44b0fc9b36
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ namespace Luban.Common.Utils
public static string GetApplicationDirectory() public static string GetApplicationDirectory()
{ {
return Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location); return AppContext.BaseDirectory;
} }
public static string GetPathRelateApplicationDirectory(string relatePath) public static string GetPathRelateApplicationDirectory(string relatePath)