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

external references in assemblies?


Hi all,

I'm trying to pull two different classes out of a single webfile (*.aspx)
and compile them separately for a library/assembly. The problem is that
each class references each other, and the compiler doesn't like that:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
sysobj.cs(171,20): error CS0246: The type or namespace name 'dynamic_control_creation'
could not be found (are you missing a using directive or an assembly reference?)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
How can I make external references in C# for each class to the other?

(DAMN - I wish C# had a linker.)
THANKS!!!

- wASP
Nov 17 '05 #1
2 1739
Hi wASP,
you will need to pull the common functionality that the two classes
reference in one another into a third DLL which will get built first, then
the other DLLs can reference that one and you will not have cyclical
references.
Mark R Dawson
http://www.markdawson.org

"wASP" wrote:

Hi all,

I'm trying to pull two different classes out of a single webfile (*.aspx)
and compile them separately for a library/assembly. The problem is that
each class references each other, and the compiler doesn't like that:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
sysobj.cs(171,20): error CS0246: The type or namespace name 'dynamic_control_creation'
could not be found (are you missing a using directive or an assembly reference?)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
How can I make external references in C# for each class to the other?

(DAMN - I wish C# had a linker.)
THANKS!!!

- wASP

Nov 17 '05 #2
On Sat, 17 Sep 2005 05:46:05 -0700, "Mark R. Dawson"
<Ma*********@discussions.microsoft.com> wrote:
Hi wASP,
you will need to pull the common functionality that the two classes
reference in one another into a third DLL which will get built first, then
the other DLLs can reference that one and you will not have cyclical
references.
Hi wASP,
you will need to pull the common functionality that the two classes
reference in one another into a third DLL which will get built first, then
the other DLLs can reference that one and you will not have cyclical
references.

Hi Mark!

I'm not sure as to how to do this - I'm new to ASP.NET.

The situation is like this:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// sysobj.cs
public class sys_obj_page : Page
{
public class sys_obj_class
{
// code ...

private dynamic_control_creation dyn_ctrl_crtn_obj;
public dynamic_control_creation Get_dyn_ctrl_crtn_obj
{ get { return dyn_ctrl_crtn_obj; } }

// more code ...
}
}

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// dynctrl.cs
public class dyn_ctrl_page : Page
{
public class dynamic_control_creation
{
private sys_obj_class sys_obj;

// more code ...
}
}
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

A reference to a dynamic_control_creation object is stored in a sys_obj_class object,
and I need to tell the compiler that it's an external reference.

I don't know much about attributes, so maybe that would have the answer.

I suppose that I could use a void ref instead of the dynamic_control_creation
object ref, then cast it when I need to - but I would think that there would be
a more elegant solution.

- wASP
Nov 17 '05 #3

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

Similar topics

2
by: Thomas Miller | last post by:
Hello, I have built a c# class library (I will call it "Assembly1"), and built an installer that installs it. It is working well. I created a new asp.net application, right-clicked on references...
2
by: Matora Nickolay | last post by:
Hello. My program has to use third party components located in several external libraries. Those components, also as my program, are usually been changed. The problem is to make my program use...
12
by: A-PK | last post by:
Anyone know how to breakdown every modules into different assemblies and refernces. Hence, to repair problematic module, only that particular module needed to be recompiled. or any place...
0
by: Mike Jansen | last post by:
We're doing .NET development for PocketPC, BizTalk, and miscellaneous other things. One of the difficulties has been keeping references to assemblies intact in a project when the referenced...
0
by: DDE | last post by:
Hi all, I have an application (number of web Services) in which I define different application variables, like application etc. Besides that, I have a couple of assemblies containing classes and...
6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
5
by: cmay | last post by:
If you add a reference to an ASP.NET 2.0 Web Project, where does it save that reference? I don't mean the DLL, I mean the reference to the DLL. In 2003 I believe it would put 1 line per...
1
by: pipbailey | last post by:
I have a VB.net EXE application (VS05). It is really just an empty MDI container for lots of forms that are also VB.net forms, but are in other external DLL assemblies (some VS03 others VS05). I...
3
by: =?Utf-8?B?Q3JhaWc=?= | last post by:
Background: I am building a Windows enterprise application that has separate assemblies for UI, business logic/rules, and data access (i.e. typical N-tier architecture). Many of the assemblies...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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.