inheritance, class library, and compile errors

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

‘----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top