iNKORE-NET / UI.WPF.Modern

Modern (Fluent 2) styles and controls for your WPF applications
https://docs.inkore.net/ui-wpf-modern
GNU Lesser General Public License v2.1
326 stars 29 forks source link

在修改目标系统版本为 10.0.18362.0 后程序运行报错 #66

Closed duduskz closed 2 weeks ago

duduskz commented 2 weeks ago

OS: Windows 11 23H2

在我修改为目标系统版本为 10.0.18362.0 前一切正常,后来我想写一个遵循系统主题的功能,于是把目标系统版本改成了 10.0.18362.0,然后在程序启动时报错: System.Windows.Markup.XamlParseException HResult=0x80131501 Message=“初始化“iNKORE.UI.WPF.Modern.ThemeResources”时引发了异常。”,行号为“10”,行位置为“18”。 Source=PresentationFramework StackTrace: 在 System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) 在 System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) 在 System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) 在 System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) 在 System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) 在 LemonChat.App.InitializeComponent() 在 E:\LemonChat\App.xaml 中: 第 1 行 在 LemonChat.App.Main()

此异常最初是在此调用堆栈中引发的: iNKORE.UI.WPF.Modern.ThemeResources.System.ComponentModel.ISupportInitialize.EndInit() MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(System.Xaml.XamlType, object, bool)

内部异常 1: FileNotFoundException: Could not load file or assembly 'iNKORE.UI.WPF, Version=1.2.4.0, Culture=neutral, PublicKeyToken=cd19e634b9706635'. 系统找不到指定的文件。 image 这是我的项目设置: image

duduskz commented 2 weeks ago

image 修改目标系统版本为7.0后程序正常运行

NotYoojun commented 2 weeks ago

开源吗?看看

duduskz commented 2 weeks ago

这个运行要在本地搭后端诶,我还没把服务端搭服务器上(

NotYoojun commented 2 weeks ago

你试试安装 iNKORE.UI.WPF

duduskz commented 2 weeks ago

感谢作者,解决了,记得在wiki上写一下,防止有和我一样的聪明玩意掉坑了( image