I found a very "funny" issue in Silverlight, which cause designer to stop working. Because, such things make me crazy, hope this post will help you save you time.
If you have a page with some custom user control, which works properly, but designed doesn't want to show it in preview mode, try to llo for following error:
Error 2 Unknown namespace clr-namespace:Daenet.Xy.Controls;assembly=MyNamespace.MyControl;assembly=MyAssembly. [Line: 170 Position: 63] X:\\FieldDetailViewControl.xaml 39 17 MyAssembly Note, that this error doesn't appear in output window, which is not another silvering problem (out of scope).
So, the bad on this error is that it doesn't say anything useful. Moreover it point to the line of code which from your point of view doesn't exist in whole universe for sure.
However, there is a little entropy of information in the error described above.
The error is caused by declaration of the namespace (not shown above): xmlns:controls="clr-namespace:Daenet.Xy.Controls"
Because designed for same reason doesn't parse this correctly you can help a bit.
Change namespace as following and all will work fine:
xmlns:controls="clr-namespace:Daenet.Xy.Controls;assembly=MyAssembly"
Where MyAssembly is the name of assembly which implements controls with namespace Daenet.Xy.
If you want to do all right way, use always assembly attribute in the namespace declaration.
This is all.
Posted
Mar 02 2009, 03:59 PM
by
Damir Dobric