代码之家  ›  专栏  ›  技术社区  ›  Leandro Alsina

Visual Studio 2017无法识别命名空间

  •  1
  • Leandro Alsina  · 技术社区  · 7 年前

    我正在用UWP,C#/XAML开发一个应用程序。

    我有一堆UserControl,最近将.xaml和.xaml.cs文件移到一个名为VisualControls的专用文件夹中,并将.VisualControls添加到所有类的名称空间中

    似乎是VS2017中的一个bug,IDE在命名空间中找不到控件类。

    VS does not find the class of user control, if I remove the xmlns reference, the IDE suggests the very same xmlns reference, and the error persist

    如果我删除xmlns:VisualControls reference 在Capacitor.xaml文件(或GroupBox控件的其他用户)中,IDE建议使用完全相同的xmlns引用,并且错误仍然存在

    在GroupBox用户控件的CS下面 CS file of UserControl

    XAML file of UserControl

    我被困在这里……(,我能做什么?

    1 回复  |  直到 7 年前
        1
  •  1
  •   touseefbsb    7 年前

    这是一个常见的错误,但很容易解决,右键单击您的解决方案和清洁解决方案两次,然后只要重建您的解决方案和问题将消失。

    推荐文章