make some projects compatible with netframework4.8 again
This commit is contained in:
@@ -8,8 +8,10 @@ public static class NativeTools
|
||||
[Obsolete("Use \"Environment.ProcessPath\" instead.")]
|
||||
public static string GetExecutablePath(bool checkRealOS = false)
|
||||
{
|
||||
#if NET8_0_OR_GREATER
|
||||
if (RuntimeInformationsEx.IsOSPlatform(OSType.Windows, checkRealOS))
|
||||
return Environment.ProcessPath;
|
||||
#endif
|
||||
return Process.GetCurrentProcess().MainModule.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user