WPF应用程序中的XamlParseException - 但仅限于在XP上安装时

Sam*_*m S 6 wpf xaml windows-xp xamlparseexception

我的WPF应用程序在Windows 7上正常运行.在XP机器上安装会在启动时出现以下错误:

框架版本:v4.0.30319

描述:由于未处理的异常,进程终止.

异常信息:System.Windows.Markup.XamlParseException

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,Boolean,System.Object,System.Xaml.XamlObjectWriterSettings,System.Uri)

在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)

在System.Windows.Application.LoadComponent(System.Object,System.Uri)

at MyApplication.App.InitializeComponent()

在MyApplication.App.Main()

我想我可能遇到了这个问题的答案中描述的问题:

Windows XP上的XamlParseException

因为我在地方使用PresentationFramework.Aero.有没有办法解决这个问题,还是我必须删除Aero?这是一个痛苦,因为我正在使用一些ButtonChromes

TIA

小智 6

我在Windows XP SP3上遇到了同样的问题,对我来说,问题是通过将PresentationFramework.Aero引用的"Copy Local"属性设置为"True"来解决的.