You are trying to reference System.Net from mscorlib. mscorlib is special. Every other 
meaningful assembly depends on it.

I know about at least two obstacles you would have to solve if you want to reference 
other assemblies from mscorlib:

- You would have to solve the circular dependencies in the build system. This is 
doable: you can build mscorlib without your piece of code, then build System.dll, then 
rebuild mscorlib again with your piece of code.

- The much harder problem would be to fix the loader to handle references to other 
assemblies from mscorlib. I guess you would hit the problem with mscorlib being loaded 
into the system domain, but not being able to load other assemblies into the system 
domain.


I think the right thing to do in your case is to move your code into separate 
assembly, and dynamically load this assembly from mscorlib. This technique is used in 
mscorlib to solve problems like yours.
See LoadISymWrapper() in sscli\clr\src\bcl\system\reflection\emit\assemblybuilder.cs 
for simple example.

-Jan

This posting is provided "AS IS" with no warranties, and confers no rights.

-----Original Message-----
From: Ezequiel Alabaça [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 19, 2003 2:55 AM
To: [EMAIL PROTECTED]
Importance: High

Hi.
I have already referenced System.Net but when I compile the compiler
gives me an error: "The type or namespace name 'Net' does not exist in
the class or namespace 'System' (are you missing an assembly
reference?)."
I'm using this namespace in
sscli\clr\src\bcl\system\runtime\remoting\realproxy.cs.
How can I add this reference when compiling Rotor?
 
Thank's in advance.
 
Ezequiel Alabaça
 

Reply via email to