WPF 应用程序中的 XamlParseException - 但仅当安装在 XP 上时才会出现 [英] XamlParseException in WPF application - but only on when installed on XP
问题描述
我的 WPF 应用程序在 Windows 7 上运行良好.在 XP 机器上安装会在启动时出现以下错误:
My WPF application is running fine on Windows 7. Installation on XP machine brings up the following error on startup:
框架版本:v4.0.30319
Framework Version: v4.0.30319
描述:过程是由于未处理而终止例外.
Description: The process was terminated due to an unhandled exception.
异常信息:System.Windows.Markup.XamlParseException
Exception Info: System.Windows.Markup.XamlParseException
堆栈:在System.Windows.Markup.XamlReader.RewrapException(System.Exception,System.Xaml.IXamlLineInfo, System.Uri)
Stack: at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
在System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader,System.Xaml.IXamlObjectWriterFactory,布尔值,System.Object,System.Xaml.XamlObjectWriterSettings,System.Uri)
at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
在System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader,布尔值,System.Object,System.Xaml.Permissions.XamlAccessLevel,System.Uri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
在System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream,System.Windows.Markup.ParserContext,System.Object, Boolean)
at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
在System.Windows.Application.LoadComponent(System.Object,System.Uri)
at System.Windows.Application.LoadComponent(System.Object, System.Uri)
在MyApplication.App.InitializeComponent()
at MyApplication.App.InitializeComponent()
在 MyApplication.App.Main()
at MyApplication.App.Main()
我想我可能遇到了这个问题的答案中描述的问题:
I think I may be experiencing the problem described in the answer to this question:
Windows XP 上的 XamlParseException
因为我在某些地方使用 PresentationFramework.Aero.有没有办法解决这个问题,还是我必须删除 Aero?这很痛苦,因为我正在使用一些 ButtonChromes
as I am using PresentationFramework.Aero in places. Is there a way to fix this or will I have to remove Aero? This is a pain as I am using some ButtonChromes
TIA
推荐答案
我在 Windows XP SP3 上遇到了同样的问题,对我来说,通过设置PresentationFramework.Aero 对 "True" 的引用.
I had the same problem on Windows XP SP3 and for me the problem was solved by setting the "Copy Local" property of the PresentationFramework.Aero reference to "True".
这篇关于WPF 应用程序中的 XamlParseException - 但仅当安装在 XP 上时才会出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!