473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

NEED HELP: References error when using subclasses

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!
Jul 21 '05 #1
0 1284

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers...
0
by: the one | last post by:
Hello. I have two errors that I have been unable to resolve. Any suggestions are greatly appreciated. We are to create an abstract class called Auto which has two subclasses Sport and...
13
by: Markus Ernst | last post by:
Hello In a content administration tool I call classes from inside classes in order to separate the admin functions from the display-only functions: class book { var $title; var $author;...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
5
by: StillStuckOnJava | last post by:
I'm having a stupid problem with V.S./C#. I've created a class and two subclasses, and I want to instantiate either of hte subclasses after users make a selection. Then I want to use that class to...
0
by: Vera | last post by:
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...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
5
by: ryanoasis | last post by:
Working on a C++ assignment and I cant figure out the problems I am having w/ Templates and Subclasses. I know there are issues with templates and certain compilers so I am not sure what the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.