I have recently upgraded to VS 2012, I had to as I needed to start using the .net 4.5 but that is besides the point. My problem is the following:
I have a Resource
WPF is unable to resolve the resource dictionary that you are trying to merge. When you create a merged dictionary, WPF follows a set of rules to attempt to resolve the URI. In your case, the URI is ambiguous, so WPF is unable to reliably resolve it.
Change the Source
URI in the App.xaml
to an absolute pack URI. For example, if you project is called MyProject
(i.e.: "MyProject" is the short assembly name), then you should change the Source
in App.xaml
to:
This assumes AppStyles.xaml
is in the root of MyProject
. You can optionally specify the authority, assembly version and public key information of the signed assembly. However, you should be safe with the short assembly name (MyProject, in the above example).
See this page on MSDN for further details on Pack URIs in WPF: http://msdn.microsoft.com/en-us/library/aa970069(v=vs.110).aspx