<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 an exception.' Line number '10' and line position '18'.
{"Cannot locate resource 'controlsbox;librarycontrolrescourcedictionary.xaml'."}
I tried following the advice provided in the following: WPF IOException Cannot locate resource No avail. I've moved the LbiraryControlRescourceDictionary.xaml file to different project folders, readding the file, changing the target platform, changing the property to Page or Rescource, Copying it to the output directory, and more.
The biggest weird part is that sometimes the same project, with no changes, will load on some computers without this error with no problem. It can build it and deploy the executable fine. But some machines, same OS, same WPF SDK and visual studio, will not handle this rescource file right.
Here is the project layout if it helps: i.imgur.com/XdifDHa.png
EDIT: For the last week or so I just deleted it. I had no idea what it was and my program has worked fine since. It was part of the Microsoft SDK example pack so it was already there when I found it. But I guess it wasn't that important. If you have an idea of what the problem was, please let me know and I'll add it back in for kicks.