Type reference cannot find public type named

前端 未结 5 1477
温柔的废话
温柔的废话 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:56

    I just discovered another issue, that may cause this problem. It is allowed to use dots in project names, e.g.

    FancyTrainsimTools.Desktop
    

    is a valid project name. If you use folders in the project, you may get constructs like this:

    FancyTrainsimTools.Desktop.Logic
    

    If you define data templates referencing items in this folder, this results in error messages. I also used a hierarchical datatemplate, but this gives slightly different messages.

    The workaround:

    Rename your project by removing the dot:

    FancyTrainsimToolsDesktop
    

    Edit: I try to reproduce the issue again, in order to report a bug, but now it all works.... So mystery not yet solved and not clear what to do to create w ork around....

提交回复
热议问题