Issues with undefined namespaces

Feb 23, 2013 at 10:20 PM
Edited Feb 23, 2013 at 10:24 PM
I used NuGet to import the compiled library and any control I declare in XAML throws a couple errors, underlines it and the designer fails to load. Note, it seems to work at runtime.

This is the first project where I've decided "I'd like to utilize the designer, and not just rely on visualizing markup in my head", but all controls in this toolkit are making that an impossibility. Is this happening for anybody else?

Errors when declaring a CascadingTextBlock with the namespace:
xmlns:rt="using:WinRTXamlToolkit.Controls"

Error 1 The name "CascadingTextBlock" does not exist in the namespace "using:WinRTXamlToolkit.Controls".
Error 2 Undefined namespace. The 'using' URI refers to a namespace 'WinRTXamlToolkit.Controls' that could not be found.
Error 3 The type 'rt:CascadingTextBlock' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

I have cleaned the project, rebuilt the project, and ran it and it does not affect the error output.

Thanks.
Coordinator
Feb 25, 2013 at 7:44 AM
I think some of the designer errors are just bugs in the designer, since the controls work perfectly well outside of the designer. Anyways - I just tried adding a reference to the Toolkit in a new project through NuGet, added a CascadingTextBlock and it shows up find in the designer. Yet, when I look at the samples project/CascadingTextBlockTestPage.xaml that references the Toolkit project itself (with the sources available) - the designer shows these errors in the Error List panel:

Error 32 The type 'controls:AlternativePage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Projects\CodePlex\WinRTXamlToolkit\WinRTXamlToolkit\WinRTXamlToolkit.Sample\Views\Controls\CascadingTextBlockTestPage.xaml 1 2 WinRTXamlToolkit.Sample
Error 33 The attachable property 'Resources' was not found in type 'AlternativePage'. C:\Projects\CodePlex\WinRTXamlToolkit\WinRTXamlToolkit\WinRTXamlToolkit.Sample\Views\Controls\CascadingTextBlockTestPage.xaml 11 6 WinRTXamlToolkit.Sample
Error 34 The type 'controls:CascadingTextBlock' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Projects\CodePlex\WinRTXamlToolkit\WinRTXamlToolkit\WinRTXamlToolkit.Sample\Views\Controls\CascadingTextBlockTestPage.xaml 44 10 WinRTXamlToolkit.Sample
Error 35 The attachable property 'TextBlockTemplate' was not found in type 'CascadingTextBlock'. C:\Projects\CodePlex\WinRTXamlToolkit\WinRTXamlToolkit\WinRTXamlToolkit.Sample\Views\Controls\CascadingTextBlockTestPage.xaml 66 14 WinRTXamlToolkit.Sample

Still, the designer view shows everything correctly.
Feb 25, 2013 at 1:01 PM
It seems to work sporadically. Certainly something weird with the designer. I am just curious if there's something unique that causes it which could be changed since I don't see this behavior in any other 3rd party controls I've tried. Eh, something to consider, it's not life or death.
Coordinator
Feb 25, 2013 at 9:09 PM
Sorry, I wish I knew how to fix that.