From d8fe45dc9abd3b4b7c8e48a623207976c4061c61 Mon Sep 17 00:00:00 2001 From: Vance Morrison Date: Fri, 15 Dec 2017 15:12:26 -0800 Subject: [PATCH] Fix bug where PerfView64 does not launch as a 64 bit app when run off a network share. Also fixed but running 64 bit on win 10. --- src/PerfView/App.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PerfView/App.cs b/src/PerfView/App.cs index aa14cd91f..670567169 100755 --- a/src/PerfView/App.cs +++ b/src/PerfView/App.cs @@ -181,7 +181,7 @@ private static int DoMain(string[] args, ref bool newConsoleCreated, ref StreamW // It also can work if we only do viewing operations (msdia* uses old libraries), but again do we care? // If we do we can move this to before the DLLs are loaded. // Give the user a clean error. - if (Environment.Is64BitProcess && Environment.OSVersion.Version.Major < 10) + if (Environment.Is64BitProcess && Environment.OSVersion.Version.Major * 10 + Environment.OSVersion.Version.Minor < 62) { throw new ApplicationException("The PerfView64 does not work properly Windows version < 10\r\n" + " Please use the 32 bit version (PerfView.exe)."); @@ -457,7 +457,7 @@ public static void RelaunchIfNeeded(string[] args) return; // Is the EXE on a network share - var exe = SupportFiles.MainAssemblyPath; + var exe = Assembly.GetEntryAssembly().ManifestModule.FullyQualifiedName; if (!exe.StartsWith(@"\\")) return;