I have a resource dictionary in an external assembly, which I have merged in my app.xaml, like so:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/My.Library;component/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
I wish to reference said resources using StaticResource bindings.
I am getting design-time errors in Visual Studio 2013 stating the resources do not exist. I am not getting any compiler errors though, and the resources do show up fine at run-time.
I have read posts about problems with the VS Designer not showing external resources properly, but I don't use the Designer and that is not what my question is about. I am getting errors in the error window stating the resources cannot be resolved, and I've got a serious case of the squigglies. I have tried a full clean and rebuild.
Again, everything compiles and runs fine, but this is not very convenient since I now have to sift through the error list to see what are actual errors and what is simply Visual Studio not resolving the referenced resources correctly.
For grins I did try switching to DynamicResource, and indeed the error went away. However, these resources will not be changing during the application lifetime and I do not wish to incur all of the extra overhead just to solve a problem with the IDE.
Does anybody know a proper fix for this?