473,382 Members | 1,390 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,382 software developers and data experts.

"Reference required to assembly 'RootLevel' containing the type 'RootLevel.Root'. Add one to your project."

While building on a class library for an object model, I get the above error
message.

The steps to recreate the problem are as follows:

1. Build a RootLevel.dll containing only this code:

Public Class Root
End Class

2. Build a SecondLevel.dll containing a reference to RootLevel.dll and only
this code:

Public Class Child
Private _root As RootLevel.Root

Public Property Root() As RootLevel.Root
Get
Return _root
End Get
Set(ByVal value As RootLevel.Root)
_root = value
End Set
End Property
End Class
3. Edit the Root class, add a reference to SecondLevel.dll and Re-build the
RootLevel.dll. The edited code looks like this:

Public Class Root
Private _child1 As SecondLevel.Child 'there will be other children

Public ReadOnly Property Child1() As SecondLevel.Child
Get
If _child1 Is Nothing Then
_child1 = New SecondLevel.Child()
_child1.Root = Me
End If
Return _child1
End Get
End Property
End Class

The reference to 'Me' is marked with the following error by the Visual
Studio.NET IDE:
"Reference required to assembly 'RootLevel' containing the type
'RootLevel.Root'. Add one to your project."
Obviously, this a simplified example, where children are plugged into the
root as needed. The children can be pretty complex and considerably
different from each other. Children need to reference the root, and children
often need to reference each other.

How do I work around this circular compilation reference situation or
whatever is going on here?

Thanks,
Kelly
Jul 21 '05 #1
2 1556
Same answer as above
Jul 21 '05 #2
Same answer as above
Jul 21 '05 #3

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

Similar topics

0
by: Michael Steidl | last post by:
I use XMLspy for handling XML files and started testing its feature to generate C# code from XML Schemas. Now I got stuck in a strange situation: (I have to add being not a C# geek, only currently...
5
by: Lionel | last post by:
Hello all, two quick questions: One: What is the difference between adding a reference to something in my C# project so I can use it (for example, adding a reference to "Microsft.DirectX" when...
5
by: TomislaW | last post by:
What is asp.net equivalent for Application("Root") in asp?
7
by: Good Enchiladas | last post by:
While building on a class library for an object model, I get the above error message. The steps to recreate the problem are as follows: 1. Build a RootLevel.dll containing only this code: ...
14
by: Geoff Jones | last post by:
Hi I'm trying to use a class that I've written in a form. Unfortunately, when I write something like: Public x As New myClass I get the compile time error: "Type Expected". Indeed, the...
1
by: pamelafluente | last post by:
Hi, Assume that I have a web application. I want to be able to use the classes that are in another project (say a Win application) on which I am working at the same time. Is it possible to...
2
by: Steve | last post by:
Kind of a strange question... I have a VB.NET 2.0 solution containing a main project (my EXE) and a number of other projects (class DLLs) that are "plug-ins" to the main app. These plugins get...
3
by: Lord0 | last post by:
I am trying to implement variable content containers using an abstract type and type substitution. My schema is as follows: <?xml version="1.0" encoding="UTF-8"?> <schema...
2
by: =?Utf-8?B?UGF1bCBMaW52aWxsZQ==?= | last post by:
I have a solution that has both c# and vb.net projects. Visual Studio 2005 sp1. One of the lower level asseblies "Utils.csproj" is a c# project that references a 3rd party dll "Framework.dll"....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.