c# - WPF IOException Cannot Locate Resource Dictionary XAML -
<application x:class="controlsbox.app" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" startupuri="window1.xaml" > <application.resources> <resourcedictionary> <resourcedictionary.mergeddictionaries> <resourcedictionary source="/controlsbox;librarycontrolrescourcedictionary.xaml"/> <resourcedictionary source="/microsoft.surface.presentation.generic;v2.0.0.0;31bf3856ad364e35;component/themes\styles.xaml"/> </resourcedictionary.mergeddictionaries> </resourcedictionary> </application.resources>
error:
'set property 'system.windows.resourcedictionary.source' threw exception.' line number '10' , line position '18'. {"cannot locate resource 'controlsbox;librarycontrolrescourcedictionary.xaml'."}
i tried following advice provided in following: wpf ioexception cannot locate resource no avail. i've moved lbirarycontrolrescourcedictionary.xaml file different project folders, readding file, changing target platform, changing property page or rescource, copying output directory, , more.
the biggest weird part same project, no changes, load on computers without error no problem. can build , deploy executable fine. machines, same os, same wpf sdk , visual studio, not handle rescource file right.
here project layout if helps: i.imgur.com/xdifdha.png
edit: last week or deleted it. had no idea , program has worked fine since. part of microsoft sdk example pack there when found it. guess wasn't important. if have idea of problem was, please let me know , i'll add in kicks.
i had same problem sdk sample...nitesh's comment above contained answer worked me, i.e. prepend "/shared/" "librarycontrolrescourcedictionary.xaml" in value source attribute.
Comments
Post a Comment