system.windows.resourcedictionary. source threw an exception wpf c#
In general this issue is caused when a referenced resource cannot be found.
<Application x:Class="AppName.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>
In my specific circumstance, as the xaml above details, this issue was caused by a reference to PresentationFramework.Aero DLL that was not contained in the output bin folder of the compiled project. Under references, setting Copy Local to true did the trick for me.
Posted on November 6, 2012, in Programming & Development and tagged .net, app, application, c#, code, dictionary, exception, programming, resource, resources, wpf, xaml. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0