emoacht / Monitorian

A Windows desktop tool to adjust the brightness of multiple monitors with ease
https://www.microsoft.com/store/apps/9nw33j738bl0
MIT License
3.38k stars 159 forks source link

TypeLoadException on Windows 8.1 or older OS #491

Closed raddyst closed 1 year ago

raddyst commented 1 year ago

Maybe Windows 10+

[Date: 04.08.2023 14:23:12 Ver: 4.4.2.0]
System.TypeLoadException: Could not find Windows Runtime type 'Windows.ApplicationModel.AppService.AppServiceConnection'. HResult: -2146233054 TypeName: Windows.ApplicationModel.AppService.AppServiceConnection
 ---> System.PlatformNotSupportedException: Operation is not supported on this platform. HResult: -2146233031
   --- End of inner exception stack trace ---
   at Monitorian.Supplement.BrightnessConnector.ReleaseAppServiceConnection()
   at Monitorian.Supplement.BrightnessConnector.Dispose(Boolean disposing)
   at Monitorian.Core.Models.Watcher.BrightnessConnector.Dispose(Boolean disposing)
   at Monitorian.Core.AppControllerCore.End()
   at Monitorian.App.OnExit(ExitEventArgs e)
   at System.Windows.Application.DoShutdown()
   at System.Windows.Application.ShutdownImpl()
   at System.Windows.Application.ShutdownCallback(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

[Date: 04.08.2023 14:23:21 Ver: 4.4.2.0]
System.TypeLoadException: Could not find Windows Runtime type 'Windows.ApplicationModel.AppService.AppServiceConnection'. HResult: -2146233054 TypeName: Windows.ApplicationModel.AppService.AppServiceConnection
 ---> System.PlatformNotSupportedException: Operation is not supported on this platform. HResult: -2146233031
   --- End of inner exception stack trace ---
   at Monitorian.Supplement.BrightnessConnector.ReleaseAppServiceConnection()
   at Monitorian.Supplement.BrightnessConnector.Dispose(Boolean disposing)
   at Monitorian.Core.Models.Watcher.BrightnessConnector.Dispose(Boolean disposing)
   at Monitorian.Core.AppControllerCore.End()
   at Monitorian.App.OnExit(ExitEventArgs e)
   at System.Windows.Application.DoShutdown()
   at System.Windows.Application.ShutdownImpl()
   at System.Windows.Application.ShutdownCallback(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at Monitorian.App.Main()

Monitorian.exe.6836.zip

emoacht commented 1 year ago

Thank you for reporting. I have not expected it.

emoacht commented 1 year ago

Fixed by 768722390ac92142aba0597cf148c0b6d6f1e05e