diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs index 56c86f47158..cf3926a2b97 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs @@ -203,7 +203,7 @@ internal static void LogStartHWND(IntPtr hwnd, string fromWhere) { string msg = String.Format("BEGIN: {0:X} -- Setting DWP, process = {1} ({2}) {3}", hwnd, - System.Diagnostics.Process.GetCurrentProcess().ProcessName, + Path.GetFileNameWithoutExtension(Environment.ProcessPath), fromWhere, System.Environment.NewLine); @@ -214,7 +214,7 @@ internal static void LogFinishHWND(IntPtr hwnd, string fromWhere) { string msg = String.Format("END: {0:X} -- Setting DWP, process = {1} ({2}) {3}", hwnd, - System.Diagnostics.Process.GetCurrentProcess().ProcessName, + Path.GetFileNameWithoutExtension(Environment.ProcessPath), fromWhere, System.Environment.NewLine);