Every time I try to do anything with Code Analysis, Visual Studio crashes. The event viewer shows the crash is caused by an invalid window-splitter size.
Stacktrace:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentOutOfRangeException
at System.Windows.Forms.SplitContainer.set_SplitterDistance(Int32)
at Microsoft.VisualStudio.CodeAnalysis.AdvancedRuleSetEdit.LoadHelpPaneSizeString(System.String)
at Microsoft.VisualStudio.CodeAnalysis.AdvancedRuleSetEdit.LoadHelpPaneSettings()
at Microsoft.VisualStudio.CodeAnalysis.AdvancedRuleSetEdit.SplitterResized(System.Object, System.EventArgs)
at System.Windows.Forms.Control.OnResize(System.EventArgs)
at System.Windows.Forms.Control.OnSizeChanged(System.EventArgs)
at System.Windows.Forms.Control.UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.ContainerControl.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.SplitContainer.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)
Procmon shows this value is stored in the private registry bin file.
Deleting the window settings for Code Analysis fixes the cause of the crash. You may need to do this every time you close Visual Studio.
Export from the private registry bin:
If you are running into this, to resolve:
Fixed in latest VS 2019 versions