Visual Basic ASP.NET项目中的导入错误

时间:2017-08-22 18:43:21

标签: asp.net .net vb.net visual-studio iis

我目前正在设置一个项目的本地环境,我只获得了源代码。设置IIS7及其中的网站后,当我在浏览器中访问localhost时出现以下错误:

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: BC30002: Type XXXLibrary.XXX_ObjectManager' is not defined.

    Source Error:


    Line 5:      Inherits System.Web.UI.MasterPage
    Line 6:  
    Line 7:      Dim xxxManager As XXXLibrary.XXX_ObjectManager
    Line 8:  
    Line 9:      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

在寻找类似XXXLibrary.XXX_ObjectManager名称结构的东西后,我找到了一个名为XXXLibrary的单独项目(存储库),其结构如下:

XXXLibrary/ObjectManager/XXX_ObjectManagerMain.vb

还有其他.vb个文件,但XXX_ObjectManagerMain.vb包含以下类Partial Public Class XXX_ObjectManager,我相信这是我原始项目正在搜索的文件。

我的问题是如何修复此imports声明?我对VB和Windows技术的经验非常有限,所以我觉得有点像一只盲目的小猫试图找到解决基本问题的方法。

感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

添加对其他项目的引用。

1)在解决方案资源管理器中右键单击现有项目

2)转到添加>参考

3)选中XXXLibrary项目旁边的框