Exception:调用线程无法访问此对象,因为另一个线程拥有该对象。

报错信息 1
InvalidOperationException: 调用线程无法访问此对象,因为另一个线程拥有该对象。
StackTrace:
   在 System.Windows.Threading.Dispatcher.VerifyAccess()
   在 Microsoft.Web.WebView2.Wpf.WebView2Base.get_CoreWebView2()
   在 CallSite.Target(Closure , CallSite , Object )
   在 __ScriptExecution.__0kqpvrm7.AutoUnzipMonitor.SendMessageToFrontend(String type, Object payload)
   在 __ScriptExecution.__0kqpvrm7.AutoUnzipMonitor.ProcessNewFile(String filePath)
   在 System.IO.FileSystemWatcher.OnCreated(FileSystemEventArgs e)
   在 System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   在 System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

版本:1.44.44 2025-12-20 22:58 Microsoft Windows NT 10.0.19045.0
报错信息 2
InvalidOperationException: 调用线程无法访问此对象,因为另一个线程拥有该对象。
StackTrace:
   在 System.Windows.Threading.Dispatcher.VerifyAccess()
   在 System.Windows.DependencyObject.GetValue(DependencyProperty dp)
   在 System.Windows.NameScope.GetNameScope(DependencyObject dependencyObject)
   在 System.Windows.NameScope.NameScopeFromObject(Object obj)
   在 System.Windows.FrameworkElement.FindScope(DependencyObject d, DependencyObject& scopeOwner)
   在 DynamicClass.UpdateTextBoxes(Window win, Int32 x, Int32 y, Int32 w, Int32 h)
   在 DynamicClass.<>c__DisplayClass18.<StartProcessing>b__15(Object state)
   在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   在 System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   在 System.Threading.ThreadPoolWorkQueue.Dispatch()

版本:1.44.31 2025-12-18 13:15 Microsoft Windows NT 10.0.19044.0