]> Visual Studio 2013 crashing when moving tool windows 🌐:aligrant.com

Visual Studio 2013 crashing when moving tool windows

Alastair Grant | Fri 14 May 2021

One of the irritations of supporting Microsoft BizTalk Server is being dependent on a specific version of Visual Studio.  I've been making some changes with Visual Studio 2013 recently and have been getting quite frustrated with it keep crashing when I tried to dock a tool window to the IDE.  The error on crash isn't very helpful, a NullReferenceException (gotta love them) in PresentationCore.  The Windows Application Event Log gives a bit more detail, with a .NET Runtime event logged:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
   at System.Windows.Interop.HwndMouseInputProvider.HasCustomChrome(System.Windows.Interop.HwndSource, RECT ByRef)
   at System.Windows.Interop.HwndMouseInputProvider.GetEffectiveClientRect(IntPtr)
   at System.Windows.Interop.HwndMouseInputProvider.PossiblyDeactivate(IntPtr, Boolean)
   at System.Windows.Interop.HwndMouseInputProvider.Dispose()
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

This seems to be a common problem in multiple versions of Visual Studio caused by a February update to .NET 4.8.  But, helpfully the patch number is different for different versions of Windows, so tracking down what to uninstall is a bit tricky.  There is a fix for Visual Studio 2019, but as Visual Studio 2013 isn't being updated, the only current route is removing the update.

OS Update

Windows 8.1


Windows Server 2012 R2


Windows 10


Windows Server


There might be other versions, the patch was around February 2021, and searching for the OS and .NET 4.8 patches can dig out the log, but it's not easy to find on the MS site otherwise.

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.