This commit is contained in:
Tyrrrz
2023-05-16 01:56:28 +03:00
parent e52781c25a
commit aa8315b68d

View File

@@ -259,7 +259,7 @@ public partial class CliApplicationBuilder
// If the process path has the same name and parent directory as the entry assembly path, // If the process path has the same name and parent directory as the entry assembly path,
// but different extension, it's a framework-dependent .NET Core app launched through the apphost. // but different extension, it's a framework-dependent .NET Core app launched through the apphost.
if (PathEx.AreEqual(Path.ChangeExtension(entryAssemblyFilePath, "exe"), processFilePath) || if (PathEx.AreEqual(Path.ChangeExtension(entryAssemblyFilePath, "exe"), processFilePath) ||
PathEx.AreEqual(Path.ChangeExtension(entryAssemblyFilePath, ""), processFilePath)) PathEx.AreEqual(Path.GetFileNameWithoutExtension(entryAssemblyFilePath), processFilePath))
{ {
return Path.GetFileNameWithoutExtension(entryAssemblyFilePath); return Path.GetFileNameWithoutExtension(entryAssemblyFilePath);
} }