代码之家  ›  专栏  ›  技术社区  ›  YodasMyDad

在VS2008中将Web转换为Web项目时出现问题

  •  0
  • YodasMyDad  · 技术社区  · 17 年前

    public partial class SomePageName : BasePage
    {
    }
    

    但现在我明白了吗?其他班级也一样吗?

    The type or namespace name 'BasePage' could not be found (are you missing a using directive or an assembly reference?)
    

    如何找出我缺少的“using”指令以及什么是程序集引用?

    6 回复  |  直到 17 年前
        1
  •  2
  •   Steve    17 年前

        2
  •  1
  •   ggonsalv    16 年前

    使用对象资源管理器在项目中找到类BasePage。

    进行大规模搜索并替换为完整名称。

        3
  •  0
  •   David M    17 年前

    在解决方案资源管理器中(如果看不到,可在“视图”菜单上找到),您将看到web应用程序包含一个标记为“引用”的节点。右键单击此项并选择“添加引用”,当对话框出现时,在“项目”选项卡上,您可以添加对定义此BasePage类的其他项目的引用。编译时,它将成为程序集引用。

        4
  •  0
  •   Community Mohan Dere    9 年前

    How to convert in a Web Site Project -将让您开始-它适用于VS2005,但仍然适用于Visual Studio 2008。

    你可能想看看 difference between the 2 types of projects

        5
  •  0
  •   Patrick    16 年前

    您可以尝试在VisualStudio中“转换为Web应用程序”。它可以在VisualStudio中新Web应用程序项目的上下文菜单中找到。

        6
  •  0
  •   Peter O. Manuel Pinto    13 年前

    还有一个可能的问题。您可能需要将“生成操作”设置为“编译而不是内容”。右键单击.cs文件,调出属性并确保生成操作是编译的。