编译网站时出错,但建设时没有

时间:2015-09-10 05:46:23

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

我有一个网站解决方案,其中包括网站项目,数据层项目和实体项目。

当我构建并运行网站时,我没有任何问题。但是当我编译(使用预编译)时,我会收到错误。

我得到的错误都来自一页:

Error   36  'branches_list' is not a member of 'users'. 
Error   37  'cash_seq' is not a member of 'users'.  
Error   38  'management_seq' is not a member of 'users'.    
Error   39  'Password' is not a member of 'users'.  

完整错误是:

error BC30456: 'management_seq' is not a member of 'users'.

该列表包含在实体项目中找到的用户类的所有属性。 网站上还有其他页面使用相同的类,不会产生任何错误。

所有项目都被正确引用,所有项目都使用相同的.NET版本。

我已经包含了一些代码和下面的类:

Dim _user As New Users

_user.Password = txtPassword.Text


Public Class Users

    Public Property Username As String
    Public Property Password As String
    Public Property isAdmin As Boolean
    Public Property isActive As Boolean
    Public Property management_seq As String
    Public Property cash_seq As String
    Public Property stock_seq As String
    Public Property customers_seq As String
    Public Property suppliers_seq As String
    Public Property graphs_seq As String
    Public Property additional_seq As String
    Public Property branches_list As List(Of Branches)

End Class

Public Class Branches

    Public Property BranchCode

End Class

提前致谢!

0 个答案:

没有答案