473,473 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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!
Nov 22 '05 #1
0 812

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...
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...
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;...
1
by: Tom Rahav | last post by:
Hello all! I develop application in Visual Basic .NET and ORACLE database. My question is how do I "send" script file to the database using visual basic .net. Other words, is there any way to...
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...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.