diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 738b07992..738176b87 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -52,6 +52,7 @@ 7.1.2 8.0.0 5.0.0 + 1.0.2792.45 4.5.1 8.0.0 8.0.0 diff --git a/src/PerfView/App.cs b/src/PerfView/App.cs index 204753146..75c01b930 100755 --- a/src/PerfView/App.cs +++ b/src/PerfView/App.cs @@ -41,6 +41,7 @@ public class App public static int Main(string[] args) { CommandProcessor = new CommandProcessor(); + App.SetAccessibilitySwitchOverrides(); StreamWriter writerToCleanup = null; // If we create a log file, we need to clean it up. int retCode = -1; @@ -1079,6 +1080,20 @@ private static bool UserOKWithSymbolServerGui() private static string m_SymbolPath; private static string m_SourcePath; + /// + /// This enables using new accessibility features that were implemented on .NET Framework 4.7.1 or later + /// despite the application targeting an earlier framework version. This resolves a few accessibility issues + /// that were fixed in later versions of .NET Framework. For more information, see below: + /// https://learn.microsoft.com/en-us/dotnet/framework/whats-new/whats-new-in-accessibility#accessibility-switches + /// + private static void SetAccessibilitySwitchOverrides() + { + AppContext.SetSwitch("Switch.UseLegacyAccessibilityFeatures", false); + AppContext.SetSwitch("Switch.UseLegacyAccessibilityFeatures.2", false); + AppContext.SetSwitch("Switch.UseLegacyAccessibilityFeatures.3", false); + AppContext.SetSwitch("Switch.UseLegacyAccessibilityFeatures.4", false); + } + #region CreateConsole [System.Runtime.InteropServices.DllImport("kernel32", SetLastError = true)] private extern static int AllocConsole(); diff --git a/src/PerfView/Dialogs/FileInputAndOutput.xaml b/src/PerfView/Dialogs/FileInputAndOutput.xaml index fbc11eb97..397ca59c4 100644 --- a/src/PerfView/Dialogs/FileInputAndOutput.xaml +++ b/src/PerfView/Dialogs/FileInputAndOutput.xaml @@ -27,7 +27,7 @@ Help - + @@ -43,15 +43,16 @@ - + + ToolTip="This shows all the files/directories that match the prefix in the InputFile text box." + AutomationProperties.Name="Files"/> - + @@ -167,43 +167,43 @@ ToolTip="Fire an event (and stack trace) every time the processor switch from one thread to another." > Kernel Base: - + Cpu Samples: - + Page Faults: - + File I/O: - + Registry: - + VirtAlloc: - + MemInfo: - + @@ -231,37 +231,37 @@ ToolTip="Collect information about creation and closing of Windows OS handles." > Handle: - + RefSet: - + IIS: - + NetMon: - + Net Capture: - + Tasks (TPL): - + @@ -290,43 +290,43 @@ ToolTip="These are the default .NET runtime events. They should usually be left on." > .NET : - + .NET Stress: - + Background JIT: - + .NET Calls: - + JIT Inlining: - + .NET Native CCW: - + .NET Loader: - + @@ -354,37 +354,37 @@ ToolTip="Turn off everything except events which happen when .NET Garbage Collections happen." > GC Collect Only: - + GC Only: - + .NET Alloc: - + .NET SampAlloc: - + ETW .NET Alloc: - + Dump Heap: - + @@ -402,7 +402,7 @@ ToolTip="A comma separated list of additional providers to turn on during data collection." > Additional Providers: - +