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

Home Posts Topics Members FAQ

Project reference problem

Hi!

According the code below (2 class library projets):

'Project 1: ns1.Class1
Public Class Class1
Public Sub New()
Dim cls2 As New ns2.Class2
cls2.method1(Me) 'THE ERROR OCCURS HERE (on Me keyword)...
cls2 = Nothing
End Sub
End Class

'Project 2: ns2.Class2
Public Class Class2
Public Sub method1(ByVal cls1 As ns1.Class1)
'do something here...
End Sub
End Class

I get de following precompiler error:
Reference required to assembly 'class1' containing the type
'ns1.Class1'. Add one to your project.

I read similar posts on other groups but no one suggested a solution
that worked for me...
Thanks.
Dom
Jul 21 '05 #1
2 1273
"Dominic Rousseau" <do**************@dmr.ca> schrieb
'Project 1: ns1.Class1
Public Class Class1
Public Sub New()
Dim cls2 As New ns2.Class2
cls2.method1(Me) 'THE ERROR OCCURS HERE (on Me keyword)...
cls2 = Nothing
End Sub
End Class

'Project 2: ns2.Class2
Public Class Class2
Public Sub method1(ByVal cls1 As ns1.Class1)
'do something here...
End Sub
End Class


You're trying to make circular references between projects. This is not
possible.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Jul 21 '05 #2
"Dominic Rousseau" <do**************@dmr.ca> schrieb
'Project 1: ns1.Class1
Public Class Class1
Public Sub New()
Dim cls2 As New ns2.Class2
cls2.method1(Me) 'THE ERROR OCCURS HERE (on Me keyword)...
cls2 = Nothing
End Sub
End Class

'Project 2: ns2.Class2
Public Class Class2
Public Sub method1(ByVal cls1 As ns1.Class1)
'do something here...
End Sub
End Class


You're trying to make circular references between projects. This is not
possible.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Jul 21 '05 #3

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

Similar topics

8
by: Mahesh | last post by:
Hi All, When I copy and paste the project and open newer solution in Visual Studio.NET that newer solution still references files of older solution (It opens the older projects files). I...
12
by: Jones | last post by:
I am having problems with my C# project. The project was built using VS.net (original release with service pack 1). The project includes windows forms and a DLL (dot.net) After getting the...
7
by: Dan | last post by:
I'd like to have a set of more-or-less common code which I want to use for both desktop and smart device projects. I have two questions: 1. How can I set up conditional compile directives for...
2
by: David Zuckerman | last post by:
I'm developing an ASP.NET solution, and one of the things I need to do is to have it return system information for various servers on our network. I wanted to do this using the various methods of...
7
by: George Copeland | last post by:
This is a request for assistance analyzing a problem we are experiencing in our VB6 development environment. All our code is developed in VB6, and our persistance layer is SQL Server. We are...
6
by: liu | last post by:
Hi all, in my vb.net solution, i have 3 project: 1. Main-this is the startup or the base of my window application. 2. Sales-this is the project that contains all the sales info 3. Product-this...
3
by: Jerad Rose | last post by:
This is regarding Visual Studio 2003 (framework 1.1). We have several projects/libraries. Of course, many of these reference each other. If we only had one solution, we would simply add all of...
5
by: Richard J Foster | last post by:
Hi there, I have a pair of C# projects in VS2003. The first project, a dll, is referenced in the second via a project reference. The assemblies in question are delay-signed during a...
24
by: =?Utf-8?B?RHIuIFMu?= | last post by:
I am incorporating three existing programs into a new "all in one" program. I have added the three projects to the new all in one project. How do I instruct the new initial menu to launch the main...
4
by: | last post by:
I have learned about compartmentalizing my code base using Class Libraries. I have my common code such as my ORM framework broken out into their own Class Libraries, which are referenced as...
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.