Type reference cannot find public type named

前端 未结 5 1475
温柔的废话
温柔的废话 2021-01-07 20:24

I am getting error like \"Type reference cannot find public type named \'Sign\'\" in xaml. how can i resolve it. the Sign class is in the same assembly.

<         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-07 20:38

    If the type resides in the same assembly as the XAML you are modifying, omit the assembly segment of the clr-namespace when you import the namespace.

    DO

    xmlns:local="clr-namespace:NamespaceContainingSignClass"
    

    DO NOT

    xmlns:local="clr-namespace:NamespaceContainingSignClass;assembly=AssemblyContainingSignClassAndXAML"
    

提交回复
热议问题