Quite some time ago I posted an entry about error messages in Visual Studio like ‘The resource “styleListView” could not be resolved’
In it I had a solution which worked and worked well – in short adding the dictionary below goes a long way to eliminating the errors.
<UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Mango.Skin;Component/Resources/FrogPond/FrogPondStyle.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources>
One of the follow up posts from around the time that I never got around to posting was when this doesn’t work…
Imagine the scenario – you’ve just got yourself a brand-new-shiny SDK off the InforXtreme download portal, you update your project references to point to the new SDK and well, you get nasty unresolvable errors like above, but adding the resource dictionary doesn’t help.
Typically if you try to add an assembly reference to the DesignSystem it won’t even appear in Visual Studios Intellisense – infact, none of the Smart Office assemblies you’ve added are listed.
As it turns out, the .dlls can be marked as blocked – so if we check the properties of the files we see a nice “Unblock” button at the bottom of the property window.
We can either manually unblock each of the files or we can follow the instructions on this post http://social.technet.microsoft.com/Forums/en-US/itproxpsp/thread/806f0104-1caa-4a66-b504-7a681d1ccb33
It uses the SysInternals tool called streams.
Now, you could end up in the situation like me where even after this *and* after you’ve cleaned and recompiled your solution you still get the errors. One of the easiest ways to resolve this is by closing Visual Studio and locating and clearing the ShadowCache.
This directory is used by the Visual Studio XAML designer to cache the assemblies. For Visual Studio 2013 It is located under <User Profile>\AppData\Local\Microsoft\VisualStudio\12.0\Designer\ShadowCache
Once you’ve deleted the directories, you should be able to open Visual Studio, reload and compile your project.