XamlParseException in WPF application - but only on when installed on XP

Sam S picture Sam S · May 18, 2011 · Viewed 11.3k times · Source

My WPF application is running fine on Windows 7. Installation on XP machine brings up the following error on startup:

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.Windows.Markup.XamlParseException

Stack: at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)

at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)

at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)

at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)

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

at MyApplication.App.InitializeComponent()

at MyApplication.App.Main()

I think I may be experiencing the problem described in the answer to this question:

XamlParseException on Windows XP

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

Answer

Felix picture Felix · Aug 8, 2011

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".