更新到 MS KB4601050 后停靠工具窗口时,Visual Studio 2015 独立 Shell 应用程序崩溃 [英] Visual Studio 2015 Isolated Shell application crashing when docking Tool window after update to MS KB4601050

查看:19
本文介绍了更新到 MS KB4601050 后停靠工具窗口时,Visual Studio 2015 独立 Shell 应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用 .NET 4.8 和 Visual Studio 2015 Shell(隔离)开发的应用程序.在更新到 KB4601050 后,只要停靠工具窗口,此应用程序现在就会崩溃.

我已尝试按照知识库文章中的说明将开关添加到 app.config 文件中,但没有效果.

<预><代码><配置><运行时><AppContextSwitchOverrides value="Switch.System.Windows.Interop.MouseInput.OptOutOfMoveToChromedWindowFix=true;Switch.System.Windows.Interop.MouseInput.DoNotOptOutOfMoveToChromedWindowFix=true"/></运行时></配置>

我有什么选择来补救这种情况?

应用程序:xxxxx.exe框架版本:v4.0.30319描述:进程因未处理的异常而终止.异常信息:System.NullReferenceException在 System.Windows.Interop.HwndMouseInputProvider.HasCustomChrome(System.Windows.Interop.HwndSource, RECT ByRef)在 System.Windows.Interop.HwndMouseInputProvider.GetEffectiveClientRect(IntPtr)在 System.Windows.Interop.HwndMouseInputProvider.PossivelyDeactivate(IntPtr, Boolean)在 System.Windows.Interop.HwndMouseInputProvider.Dispose()在 System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)在 System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)在 MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

解决方案

虽然我无法通过将开关添加到 app.config 文件来解决问题,但将它们添加到注册表解决了该问题.但是,请注意文章https://docs.microsoft.com/en-us/dotnet/api/system.appcontext?view=netcore-3.1#remarks 缺少 Microsoft 和 .NETFramework 之间的斜线.

We have an application that was developed using .NET 4.8 and the Visual Studio 2015 Shell (Isolated). This application is now crashing whenever a tool window is docked following the update to KB4601050.

I have tried adding the switches to the app.config file as indicated in the KB article, but it has no effect.

<configuration>
   <runtime>
      <AppContextSwitchOverrides value="Switch.System.Windows.Interop.MouseInput.OptOutOfMoveToChromedWindowFix=true; Switch.System.Windows.Interop.MouseInput.DoNotOptOutOfMoveToChromedWindowFix=true" />
   </runtime>
</configuration>

What options do I have to remedy this situation?

Application: xxxxx.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)

解决方案

Although I was unable to resolve the issue by adding the switches to the app.config file, adding them to the registry resolved the issue. However, note that the registry path indicated in the article https://docs.microsoft.com/en-us/dotnet/api/system.appcontext?view=netcore-3.1#remarks is missing a slash between Microsoft and .NETFramework.

这篇关于更新到 MS KB4601050 后停靠工具窗口时,Visual Studio 2015 独立 Shell 应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆