System.ArgumentException
System.ArgumentException: An item with the same key has already been added.
at ABI.System.Collections.Generic.IDictionaryMethods2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)
复现问题的步骤
System.ArgumentException
System.ArgumentException: An item with the same key has already been added.
at ABI.System.Collections.Generic.IDictionaryMethods2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)
期望的表现
System.ArgumentException
System.ArgumentException: An item with the same key has already been added.
at ABI.System.Collections.Generic.IDictionaryMethods2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)
环境
22631.2506 23H2 Windows 11 专业版
在微软商店下载的应该是现在所知最新版
附件
System.ArgumentException
System.ArgumentException: An item with the same key has already been added.
at ABI.System.Collections.Generic.IDictionaryMethods2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)
描述遇到的问题
System.ArgumentException System.ArgumentException: An item with the same key has already been added. at ABI.System.Collections.Generic.IDictionaryMethods
2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler
2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)复现问题的步骤
System.ArgumentException System.ArgumentException: An item with the same key has already been added. at ABI.System.Collections.Generic.IDictionaryMethods
2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler
2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)期望的表现
System.ArgumentException System.ArgumentException: An item with the same key has already been added. at ABI.System.Collections.Generic.IDictionaryMethods
2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler
2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)环境
22631.2506 23H2 Windows 11 专业版
在微软商店下载的应该是现在所知最新版
附件
System.ArgumentException System.ArgumentException: An item with the same key has already been added. at ABI.System.Collections.Generic.IDictionaryMethods
2.Add(IObjectReference obj, K key, V value) at Microsoft.UI.Xaml.ResourceDictionary.Add(Object key, Object value) at Natsurainko.FluentLauncher.Services.UI.AppearanceService.ApplyThemeColorBeforePageInit(ShellPage page) at Natsurainko.FluentLauncher.Views.ShellPage..ctor() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlTypeInfoProvider.Activate_250_ShellPage() at Natsurainko.FluentLauncher.Natsurainko_FluentLauncher_XamlTypeInfo.XamlUserType.ActivateInstance() at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result) --- End of stack trace from previous location --- at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter) at Natsurainko.FluentLauncher.Services.UI.Navigation.NavigationService.NavigateTo(String key, Object parameter) at Natsurainko.FluentLauncher.Views.MainWindow.WindowEx_Activated(Object sender, WindowActivatedEventArgs args) at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_object__global__Microsoft_UI_Xaml_WindowActivatedEventArgs_.EventState.<GetEventInvoke>b__1_0(Object sender, WindowActivatedEventArgs args) at ABI.Windows.Foundation.TypedEventHandler
2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)