So, let's take it from the beginning. I had something like
<HierarchicalDataTemplate DataType="{x:Type Code:League}" ItemsSource="{Binding Path=Divisions}">
<TextBlock Text="{Binding Path=Name}"/>
</HierarchicalDataTemplate> Somewhere in the Window declaration there was a xmlns:Code="clr-namespace:MyControls.Desktop.Code"which is the namespace of the test application for the control in the library.
The application worked, but in the designer an error like "Type reference cannot find public type named 'League'.".
Many people gave the solution to remove the name of the assembly in the namespace declaration. So If I had something like "clr-namespace:MyControls.Desktop.Code;assembly=MyControls" and it was the current assembly, I should just remove it. Well, it wasn't the case here, was it?
In the end I found the solution here. You see, even if the assembly name was not specified, it was implied! And even if it was an application, not a library, it still was an assembly. And the Application name was... something with spaces in it!!
So, again, just go to the Project properties and change the Assembly name to not have spaces!
7 comments:
Tanks a lot. That really helped :-)
Many thanks! Your explanation helped where so many others had failed :D
WHY is your page refreshing constantly????
It shouldn't. It should only change the hash. What browser are you using?
Chrome. After a minute of reading, it showed 10 times in history. Anyway, thanks for this posting:)
Eh, just saw you're from Bucharest :) Adicatelea abia acum vazushi ca suntem concitadini :D Succesuri!
Thanks, you too! :)
Post a Comment