Hi,
I have a very annoying problem, with which I NEED HELP DESPERATELY!!
It smells like a bug to me, but I'm not sure.
SITUATION
This description is a very much simplified version of the real situation.
I have the following class structure:
ASSEMBLY ATools
References: None
Namespace : Tools
Classes : CToolClass
ASSEMBLY ABaseClasses
References: ATools
Namespace : BaseClasses
Classes : CBase1, CBase2
ASSEMBLY ASubClasses
References: ABaseClasses, ATools
Namespace : SubClasses
Classes : CSub1 Inherits BaseClasses.CBase1
ASSEMBLY AWebClasses
References: ABaseClasses, ASubClasses, ATools
NameSpace : WebClasses
Classes : CWebClass Inherits System.Web.Services.WebService
Both baseclasses have a method with signature:
Public Sub Init(ByVal parm As Tools.CToolClass)
The webclass has a method, which SHOULD look something like this:
<WebMethod> _
Public Function MyWebMethod() As String
Dim oObj1 As SubClasses.CSub1 = New SubClasses.CSub1
Dim oObj2 As BaseClasses.CBase2 = New BaseClasses.CBase2
Dim oTool As Tools.CToolClass = New Tools.CToolClass
...
oObj1.Init(oTool)
oObj2.Init(oTool)
...
Return ...
End Function
PROBLEMS
The following problems occur in MyWebMethod:
1.
In the above situation, I get an error on the line "Dim oObj1 As SubClasses...": "Reference required to assembly 'ABaseClasses' containing the type 'ABaseClasses.CBase1'. Add one to your project.".
As you can see, the reference is already there.
To solve this problem for the time being, I copied CBase1 into ASubClasses and made CSub1 inherit SubClasses.CBase1.
2.
After the changes made as described in 1., another error of the same type appears: "Reference required to assembly 'ATools' containing the type 'ATools.CToolClass'. Add one to your project.". However, this error appears only on the line "oObj1.Init(oTool)", which references a subclass. It does not appear on the line "oObj2.Init(oTool)", which references a baseclass.
And again, the reference is already there.
QUESTION
1. What causes the problem?
2. What can I do to solve it?
Obviously, copying all my classes into one single assembly is not what I want. So, what should I do?
PLEASE HELP ME! Thanx a lot!