Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight - Resharper and VS designer can't deal with StaticResource extension

Basically, neither Visual Studio designer, nor Resharper seem to deal with the StaticResource markup extension when I use it "normally" - without the brackets.

<StaticResource ResourceKey="SomeKey"/>

It's not an issue of finding the resource, it chokes on the property name of 'ResourceKey'. So when designer loads, or if I use Resharper's solution analysis, my error windows are always cluttered with endless instances of "Cannot resolve symbol 'ResourceKey'"

I'm using Silverlight 4 with VS2010, but I had this problem with Silverlight 3 and '08 too. Recently reinstalled the whole stack for unrelated reasons, problem remains.

This isn't a showstopper, because everything works fine at runtime and in Blend (and I turn off VS xaml designer anyhow), but it is annoying, and most importantly, puzzling.

Don't know if it's related, but when I mouseover the "StaticResource" it tells me that the class is "ms.internal.metadata.exposedtypes.presentation.staticresourceextension" - but I was pretty sure that it lives in the System.Windows namespace.

Please, overflowers, shed some light on this mystery for me.

like image 314
Egor Avatar asked Apr 16 '11 05:04

Egor


1 Answers

I found this resource after a short google. Maybe this will help point you in the right directions. You may find that it is completely irrelivant in which case sorry for wasting your time.

Cannot resolve symbol ResourceKey

like image 108
Matt Seymour Avatar answered Oct 18 '22 14:10

Matt Seymour