G
Guest
Here is the problem. I built LibA and LibB as class library projects in the
same solution as my web application HelloWorldWebApp. Wherever necessary I
added project references. Everything compiled nicely and ran smoothly.
After I finished my development, I wanted to use LibA across multiple
projects so I removed LibA from the solution and copied the LibA.dll to a
common location and added it to HelloWorldWebApp as a file reference. Now,
whenever I compile HelloWorldWebApp I receive the following error.
'Public Property ds() As System.Data.DataSet' is declared in project
'LibA.dll', which is not referenced by project 'HelloWorldWebApp.dll'.
Keep in mind that LibB still exists in the solution and now references LibA
by file. HelloWorldWebApp references LibB by project and now references LibA
by file.
If I run the application without debugging the web application works fine.
How do I fix the compilation errors?
Also, can anyone recommend a great article/walkthrough on building
distributable class libraries and properly maintaining and sharing them
within SourceSafe?
Here’s the code:
‘----------------------------------------------------
Class Library LibA
Public MustInherit Class MyWebPage : Inherits System.Web.UI.Page
'Local Dataset property
Private m_ds As DataSet
Public Property ds() As DataSet
Get
ds = m_ds
End Get
Set(ByVal Value As DataSet)
m_ds = Value
End Set
End Property
End Class
‘----------------------------------------------------
Class Library LibB
Public Class WebPage : Inherits LibA.MyWebPage
End Class
‘----------------------------------------------------
HelloWorldWebApp Web Project (helloworld.aspx web page)
Public Class helloworld : Inherits LibB.WebPage
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ds = New DataSet ’Compilation Error occurs here
End Sub
End Class
‘----------------------------------------------------
same solution as my web application HelloWorldWebApp. Wherever necessary I
added project references. Everything compiled nicely and ran smoothly.
After I finished my development, I wanted to use LibA across multiple
projects so I removed LibA from the solution and copied the LibA.dll to a
common location and added it to HelloWorldWebApp as a file reference. Now,
whenever I compile HelloWorldWebApp I receive the following error.
'Public Property ds() As System.Data.DataSet' is declared in project
'LibA.dll', which is not referenced by project 'HelloWorldWebApp.dll'.
Keep in mind that LibB still exists in the solution and now references LibA
by file. HelloWorldWebApp references LibB by project and now references LibA
by file.
If I run the application without debugging the web application works fine.
How do I fix the compilation errors?
Also, can anyone recommend a great article/walkthrough on building
distributable class libraries and properly maintaining and sharing them
within SourceSafe?
Here’s the code:
‘----------------------------------------------------
Class Library LibA
Public MustInherit Class MyWebPage : Inherits System.Web.UI.Page
'Local Dataset property
Private m_ds As DataSet
Public Property ds() As DataSet
Get
ds = m_ds
End Get
Set(ByVal Value As DataSet)
m_ds = Value
End Set
End Property
End Class
‘----------------------------------------------------
Class Library LibB
Public Class WebPage : Inherits LibA.MyWebPage
End Class
‘----------------------------------------------------
HelloWorldWebApp Web Project (helloworld.aspx web page)
Public Class helloworld : Inherits LibB.WebPage
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ds = New DataSet ’Compilation Error occurs here
End Sub
End Class
‘----------------------------------------------------