xaml - .... could not be resolved.

May 2, 2013 at 8:39 PM
Edited May 2, 2013 at 8:40 PM

In some of the sample code (and the things I am working on), I often get error messages from the xaml that say things like "The resource "CODE.Framework-Layout-SimpleFormLayout" could not be resolved."

But it is in the framework. So I am guessing this is because we have different versions, one for each of the 3 themes. But it doesn't always seem to happen. And if I run the code, it works just fine.

Is there some setting I am missing? Or is this just because the same style is defined for each of the 3 themes? And what options do I have?

May 2, 2013 at 8:45 PM
The resource gets resolved at runtime and the framework handles all that. The warning (this should not be an actual error but just a warning) can be ignored safely. Really, it's a bogus warning. There is no reason dynamic resources need to be resolved at design time. That's why they are dynamic. But Visual Studio is overly concerned there it seems. Perhaps because neither Silverlight nor Windows Phone nor WinRT support dynamic resource bindings. Still... one would expect the tool to understand the differences. I guess one could argue they erred on the side of caution :-)