364,033 Members | 4753 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

Referencing assemblies and .config files.

Mark Broadbent
P: n/a
Mark Broadbent
Hi guys, just going through remoting at the moment and a couple of questions
relating to .net in general has surfaced.
Firstly I have seen in the designer that for the namespace and many of its
associated classes of System.Runtime.Remoting are available, but certain
ones are not. A reference to System.Runtime.Remoting needs to be added to
make available all the unavailable ones. Now although I (think) understand
the concept that an assembly needs to be referenced in order for its classes
and other members to be exposed to the designer, I cant quite get my head
around why some classes of certain namespaces are available and others
arent -until a reference is made to this assembly. Is this simply a design
issue that certain parts of a namespace have been exposed in certain
assemblies. Could someone explain how this works and why it has been done?

The second part of my question relates to XML elements and attributes of
config files. Having looked at an example of storing certain predefined
elements for remoting config it has occurred to me that there must be some
kind of reference for this XML based language to configure things at
runtime. For instance I might have known how to register a client activated
channel in c# code, but how would I have known that...
{snippet!!}
<channels>
<channel ref="http" port="1234" />
</channels>
...would have done the same thing. Therefore there must be somewhere that I
can look these things up?

thanks in advance!
--


Br,
Mark Broadbent
mcdba , mcse+i
=============


Nov 16 '05 #1
Share this Question
Share on Google+
12 Replies


Christian Heide Damm
P: n/a
Christian Heide Damm
1)
A namespace can be distributed over several assemblies. A namespace doesn't really exist in an assembly - each type in the assembly just happen to have a fully qualified name that consists of several parts. Therefore, it's possible that you see some System.Runtime.Remoting types in one assembly and others in another assembly.

However, I would expect all System.Runtime.Remoting.* types to be located in System.Runtime.Remoting.dll assembly, i.e., I don't understand how you can see some of the types without a reference to System.Runtime.Remoting.dll. Try to run ildasm.exe on the assemblies that you do have references to - and see what types they contain.

2)
I don't know where the reference is. But in addition to the "standard" stuff, it's possible to add your own configuration information in that file and then read it at runtime.

Christian

---

"Mark Broadbent" wrote:
[color=blue]
> Hi guys, just going through remoting at the moment and a couple of questions
> relating to .net in general has surfaced.
> Firstly I have seen in the designer that for the namespace and many of its
> associated classes of System.Runtime.Remoting are available, but certain
> ones are not. A reference to System.Runtime.Remoting needs to be added to
> make available all the unavailable ones. Now although I (think) understand
> the concept that an assembly needs to be referenced in order for its classes
> and other members to be exposed to the designer, I cant quite get my head
> around why some classes of certain namespaces are available and others
> arent -until a reference is made to this assembly. Is this simply a design
> issue that certain parts of a namespace have been exposed in certain
> assemblies. Could someone explain how this works and why it has been done?
>
> The second part of my question relates to XML elements and attributes of
> config files. Having looked at an example of storing certain predefined
> elements for remoting config it has occurred to me that there must be some
> kind of reference for this XML based language to configure things at
> runtime. For instance I might have known how to register a client activated
> channel in c# code, but how would I have known that...
> {snippet!!}
> <channels>
> <channel ref="http" port="1234" />
> </channels>
> ...would have done the same thing. Therefore there must be somewhere that I
> can look these things up?
>
> thanks in advance!
> --
>
>
> Br,
> Mark Broadbent
> mcdba , mcse+i
> =============
>
>
>[/color]
Nov 16 '05 #2

John Wood
P: n/a
John Wood
1. I think the trade-off of having some namespaces in separate assemblies is
really down to the size of the assembly and the likelihood that it will be
referenced. Loading an assembly takes time, so they want to reduce the size
of the default assemblies as much as possible. Namespaces like Remoting and
Windows.Forms are great candidates for splitting off into separate
assemblies because they are large namespaces and used only in specific
circumstances.

2. The remoting configuration file format is all documented in MSDN.
http://msdn.microsoft.com/library/en...asp?frame=true

--
John Wood
EMail: first name, dot, last name, at priorganize.com
"Mark Broadbent" <no-spam-please@no-spam-please.com> wrote in message
news:OvHJUTdXEHA.1152@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hi guys, just going through remoting at the moment and a couple of[/color]
questions[color=blue]
> relating to .net in general has surfaced.
> Firstly I have seen in the designer that for the namespace and many of its
> associated classes of System.Runtime.Remoting are available, but certain
> ones are not. A reference to System.Runtime.Remoting needs to be added to
> make available all the unavailable ones. Now although I (think) understand
> the concept that an assembly needs to be referenced in order for its[/color]
classes[color=blue]
> and other members to be exposed to the designer, I cant quite get my head
> around why some classes of certain namespaces are available and others
> arent -until a reference is made to this assembly. Is this simply a design
> issue that certain parts of a namespace have been exposed in certain
> assemblies. Could someone explain how this works and why it has been done?
>
> The second part of my question relates to XML elements and attributes of
> config files. Having looked at an example of storing certain predefined
> elements for remoting config it has occurred to me that there must be some
> kind of reference for this XML based language to configure things at
> runtime. For instance I might have known how to register a client[/color]
activated[color=blue]
> channel in c# code, but how would I have known that...
> {snippet!!}
> <channels>
> <channel ref="http" port="1234" />
> </channels>
> ..would have done the same thing. Therefore there must be somewhere that I
> can look these things up?
>
> thanks in advance!
> --
>
>
> Br,
> Mark Broadbent
> mcdba , mcse+i
> =============
>
>[/color]


Nov 16 '05 #3

Mark Broadbent
P: n/a
Mark Broadbent
1. makes sense, thought that might be reason. Question is where am I picking
up the initial remoting classes from? -At a guess I'd say there is a
System.Runtime.Remoting namespace defined in mscorlib.dll (which I think Im
right in saying is referenced automatically). Certainly if I look at it thru
object browser it certainly seems that way.

2. Thx for this link. I was kind of hoping the documentation for all
namespaces/ classes config in Xml docs would be in one place but I guess
I'll have to see what I can find on a class by class basis. Still thx for
this starting point.

--


Br,
Mark Broadbent
mcdba , mcse+i
=============
"John Wood" <j@ro.com> wrote in message
news:uSly0pdXEHA.2716@tk2msftngp13.phx.gbl...[color=blue]
> 1. I think the trade-off of having some namespaces in separate assemblies[/color]
is[color=blue]
> really down to the size of the assembly and the likelihood that it will be
> referenced. Loading an assembly takes time, so they want to reduce the[/color]
size[color=blue]
> of the default assemblies as much as possible. Namespaces like Remoting[/color]
and[color=blue]
> Windows.Forms are great candidates for splitting off into separate
> assemblies because they are large namespaces and used only in specific
> circumstances.
>
> 2. The remoting configuration file format is all documented in MSDN.
>[/color]
http://msdn.microsoft.com/library/en...asp?frame=true[color=blue]
>
> --
> John Wood
> EMail: first name, dot, last name, at priorganize.com
> "Mark Broadbent" <no-spam-please@no-spam-please.com> wrote in message
> news:OvHJUTdXEHA.1152@TK2MSFTNGP09.phx.gbl...[color=green]
> > Hi guys, just going through remoting at the moment and a couple of[/color]
> questions[color=green]
> > relating to .net in general has surfaced.
> > Firstly I have seen in the designer that for the namespace and many of[/color][/color]
its[color=blue][color=green]
> > associated classes of System.Runtime.Remoting are available, but certain
> > ones are not. A reference to System.Runtime.Remoting needs to be added[/color][/color]
to[color=blue][color=green]
> > make available all the unavailable ones. Now although I (think)[/color][/color]
understand[color=blue][color=green]
> > the concept that an assembly needs to be referenced in order for its[/color]
> classes[color=green]
> > and other members to be exposed to the designer, I cant quite get my[/color][/color]
head[color=blue][color=green]
> > around why some classes of certain namespaces are available and others
> > arent -until a reference is made to this assembly. Is this simply a[/color][/color]
design[color=blue][color=green]
> > issue that certain parts of a namespace have been exposed in certain
> > assemblies. Could someone explain how this works and why it has been[/color][/color]
done?[color=blue][color=green]
> >
> > The second part of my question relates to XML elements and attributes of
> > config files. Having looked at an example of storing certain predefined
> > elements for remoting config it has occurred to me that there must be[/color][/color]
some[color=blue][color=green]
> > kind of reference for this XML based language to configure things at
> > runtime. For instance I might have known how to register a client[/color]
> activated[color=green]
> > channel in c# code, but how would I have known that...
> > {snippet!!}
> > <channels>
> > <channel ref="http" port="1234" />
> > </channels>
> > ..would have done the same thing. Therefore there must be somewhere that[/color][/color]
I[color=blue][color=green]
> > can look these things up?
> >
> > thanks in advance!
> > --
> >
> >
> > Br,
> > Mark Broadbent
> > mcdba , mcse+i
> > =============
> >
> >[/color]
>
>[/color]


Nov 16 '05 #4

Mark Broadbent
P: n/a
Mark Broadbent
1. thx. You'll see though that if you create a project and remove all
references, you can still access part of the System.Runtime.Remoting
namespace in code (try intellisense to see that it does) -I think these
types are in the mscorlib.dll.


--


Br,
Mark Broadbent
mcdba , mcse+i
=============
"Christian Heide Damm" <ChristianHeideDamm@discussions.microsoft.com> wrote
in message news:E9CCC5BC-38C7-4CF4-BE62-42556DB8F0B5@microsoft.com...[color=blue]
> 1)
> A namespace can be distributed over several assemblies. A namespace[/color]
doesn't really exist in an assembly - each type in the assembly just happen
to have a fully qualified name that consists of several parts. Therefore,
it's possible that you see some System.Runtime.Remoting types in one
assembly and others in another assembly.[color=blue]
>
> However, I would expect all System.Runtime.Remoting.* types to be located[/color]
in System.Runtime.Remoting.dll assembly, i.e., I don't understand how you
can see some of the types without a reference to
System.Runtime.Remoting.dll. Try to run ildasm.exe on the assemblies that
you do have references to - and see what types they contain.[color=blue]
>
> 2)
> I don't know where the reference is. But in addition to the "standard"[/color]
stuff, it's possible to add your own configuration information in that file
and then read it at runtime.[color=blue]
>
> Christian
>
> ---
>
> "Mark Broadbent" wrote:
>[color=green]
> > Hi guys, just going through remoting at the moment and a couple of[/color][/color]
questions[color=blue][color=green]
> > relating to .net in general has surfaced.
> > Firstly I have seen in the designer that for the namespace and many of[/color][/color]
its[color=blue][color=green]
> > associated classes of System.Runtime.Remoting are available, but certain
> > ones are not. A reference to System.Runtime.Remoting needs to be added[/color][/color]
to[color=blue][color=green]
> > make available all the unavailable ones. Now although I (think)[/color][/color]
understand[color=blue][color=green]
> > the concept that an assembly needs to be referenced in order for its[/color][/color]
classes[color=blue][color=green]
> > and other members to be exposed to the designer, I cant quite get my[/color][/color]
head[color=blue][color=green]
> > around why some classes of certain namespaces are available and others
> > arent -until a reference is made to this assembly. Is this simply a[/color][/color]
design[color=blue][color=green]
> > issue that certain parts of a namespace have been exposed in certain
> > assemblies. Could someone explain how this works and why it has been[/color][/color]
done?[color=blue][color=green]
> >
> > The second part of my question relates to XML elements and attributes of
> > config files. Having looked at an example of storing certain predefined
> > elements for remoting config it has occurred to me that there must be[/color][/color]
some[color=blue][color=green]
> > kind of reference for this XML based language to configure things at
> > runtime. For instance I might have known how to register a client[/color][/color]
activated[color=blue][color=green]
> > channel in c# code, but how would I have known that...
> > {snippet!!}
> > <channels>
> > <channel ref="http" port="1234" />
> > </channels>
> > ...would have done the same thing. Therefore there must be somewhere[/color][/color]
that I[color=blue][color=green]
> > can look these things up?
> >
> > thanks in advance!
> > --
> >
> >
> > Br,
> > Mark Broadbent
> > mcdba , mcse+i
> > =============
> >
> >
> >[/color][/color]


Nov 16 '05 #5

John Wood
P: n/a
John Wood
I think you'll find the remoting namespaces are held in a separate DLL
called System.Runtime.Remoting.dll.

--
John Wood
EMail: first name, dot, last name, at priorganize.com
"Mark Broadbent" <no-spam-please@no-spam-please.com> wrote in message
news:%23oBaS7dXEHA.3292@TK2MSFTNGP09.phx.gbl...[color=blue]
> 1. makes sense, thought that might be reason. Question is where am I[/color]
picking[color=blue]
> up the initial remoting classes from? -At a guess I'd say there is a
> System.Runtime.Remoting namespace defined in mscorlib.dll (which I think[/color]
Im[color=blue]
> right in saying is referenced automatically). Certainly if I look at it[/color]
thru[color=blue]
> object browser it certainly seems that way.
>
> 2. Thx for this link. I was kind of hoping the documentation for all
> namespaces/ classes config in Xml docs would be in one place but I guess
> I'll have to see what I can find on a class by class basis. Still thx for
> this starting point.
>
> --
>
>
> Br,
> Mark Broadbent
> mcdba , mcse+i
> =============
> "John Wood" <j@ro.com> wrote in message
> news:uSly0pdXEHA.2716@tk2msftngp13.phx.gbl...[color=green]
> > 1. I think the trade-off of having some namespaces in separate[/color][/color]
assemblies[color=blue]
> is[color=green]
> > really down to the size of the assembly and the likelihood that it will[/color][/color]
be[color=blue][color=green]
> > referenced. Loading an assembly takes time, so they want to reduce the[/color]
> size[color=green]
> > of the default assemblies as much as possible. Namespaces like Remoting[/color]
> and[color=green]
> > Windows.Forms are great candidates for splitting off into separate
> > assemblies because they are large namespaces and used only in specific
> > circumstances.
> >
> > 2. The remoting configuration file format is all documented in MSDN.
> >[/color]
>[/color]
http://msdn.microsoft.com/library/en...asp?frame=true[color=blue][color=green]
> >
> > --
> > John Wood
> > EMail: first name, dot, last name, at priorganize.com
> > "Mark Broadbent" <no-spam-please@no-spam-please.com> wrote in message
> > news:OvHJUTdXEHA.1152@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > Hi guys, just going through remoting at the moment and a couple of[/color]
> > questions[color=darkred]
> > > relating to .net in general has surfaced.
> > > Firstly I have seen in the designer that for the namespace and many of[/color][/color]
> its[color=green][color=darkred]
> > > associated classes of System.Runtime.Remoting are available, but[/color][/color][/color]
certain[color=blue][color=green][color=darkred]
> > > ones are not. A reference to System.Runtime.Remoting needs to be added[/color][/color]
> to[color=green][color=darkred]
> > > make available all the unavailable ones. Now although I (think)[/color][/color]
> understand[color=green][color=darkred]
> > > the concept that an assembly needs to be referenced in order for its[/color]
> > classes[color=darkred]
> > > and other members to be exposed to the designer, I cant quite get my[/color][/color]
> head[color=green][color=darkred]
> > > around why some classes of certain namespaces are available and others
> > > arent -until a reference is made to this assembly. Is this simply a[/color][/color]
> design[color=green][color=darkred]
> > > issue that certain parts of a namespace have been exposed in certain
> > > assemblies. Could someone explain how this works and why it has been[/color][/color]
> done?[color=green][color=darkred]
> > >
> > > The second part of my question relates to XML elements and attributes[/color][/color][/color]
of[color=blue][color=green][color=darkred]
> > > config files. Having looked at an example of storing certain[/color][/color][/color]
predefined[color=blue][color=green][color=darkred]
> > > elements for remoting config it has occurred to me that there must be[/color][/color]
> some[color=green][color=darkred]
> > > kind of reference for this XML based language to configure things at
> > > runtime. For instance I might have known how to register a client[/color]
> > activated[color=darkred]
> > > channel in c# code, but how would I have known that...
> > > {snippet!!}
> > > <channels>
> > > <channel ref="http" port="1234" />
> > > </channels>
> > > ..would have done the same thing. Therefore there must be somewhere[/color][/color][/color]
that[color=blue]
> I[color=green][color=darkred]
> > > can look these things up?
> > >
> > > thanks in advance!
> > > --
> > >
> > >
> > > Br,
> > > Mark Broadbent
> > > mcdba , mcse+i
> > > =============
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


Nov 16 '05 #6

Christian Heide Damm
P: n/a
Christian Heide Damm
There is some file that defines the _default switches_ for csc.exe. MsCorLib is certainly referenced by default.

If you try to run "csc.exe /nostdlib ....", then you'll probably get lots of compile errors since you're missing the basic stuff (e.g., Console.WriteLine).

Christian

---

"Mark Broadbent" wrote:
[color=blue]
> 1. thx. You'll see though that if you create a project and remove all
> references, you can still access part of the System.Runtime.Remoting
> namespace in code (try intellisense to see that it does) -I think these
> types are in the mscorlib.dll.
>
>
> --
>
>
> Br,
> Mark Broadbent
> mcdba , mcse+i
> =============
> "Christian Heide Damm" <ChristianHeideDamm@discussions.microsoft.com> wrote
> in message news:E9CCC5BC-38C7-4CF4-BE62-42556DB8F0B5@microsoft.com...[color=green]
> > 1)
> > A namespace can be distributed over several assemblies. A namespace[/color]
> doesn't really exist in an assembly - each type in the assembly just happen
> to have a fully qualified name that consists of several parts. Therefore,
> it's possible that you see some System.Runtime.Remoting types in one
> assembly and others in another assembly.[color=green]
> >
> > However, I would expect all System.Runtime.Remoting.* types to be located[/color]
> in System.Runtime.Remoting.dll assembly, i.e., I don't understand how you
> can see some of the types without a reference to
> System.Runtime.Remoting.dll. Try to run ildasm.exe on the assemblies that
> you do have references to - and see what types they contain.[color=green]
> >
> > 2)
> > I don't know where the reference is. But in addition to the "standard"[/color]
> stuff, it's possible to add your own configuration information in that file
> and then read it at runtime.[color=green]
> >
> > Christian
> >
> > ---
> >
> > "Mark Broadbent" wrote:
> >[color=darkred]
> > > Hi guys, just going through remoting at the moment and a couple of[/color][/color]
> questions[color=green][color=darkred]
> > > relating to .net in general has surfaced.
> > > Firstly I have seen in the designer that for the namespace and many of[/color][/color]
> its[color=green][color=darkred]
> > > associated classes of System.Runtime.Remoting are available, but certain
> > > ones are not. A reference to System.Runtime.Remoting needs to be added[/color][/color]
> to[color=green][color=darkred]
> > > make available all the unavailable ones. Now although I (think)[/color][/color]
> understand[color=green][color=darkred]
> > > the concept that an assembly needs to be referenced in order for its[/color][/color]
> classes[color=green][color=darkred]
> > > and other members to be exposed to the designer, I cant quite get my[/color][/color]
> head[color=green][color=darkred]
> > > around why some classes of certain namespaces are available and others
> > > arent -until a reference is made to this assembly. Is this simply a[/color][/color]
> design[color=green][color=darkred]
> > > issue that certain parts of a namespace have been exposed in certain
> > > assemblies. Could someone explain how this works and why it has been[/color][/color]
> done?[color=green][color=darkred]
> > >
> > > The second part of my question relates to XML elements and attributes of
> > > config files. Having looked at an example of storing certain predefined
> > > elements for remoting config it has occurred to me that there must be[/color][/color]
> some[color=green][color=darkred]
> > > kind of reference for this XML based language to configure things at
> > > runtime. For instance I might have known how to register a client[/color][/color]
> activated[color=green][color=darkred]
> > > channel in c# code, but how would I have known that...
> > > {snippet!!}
> > > <channels>
> > > <channel ref="http" port="1234" />
> > > </channels>
> > > ...would have done the same thing. Therefore there must be somewhere[/color][/color]
> that I[color=green][color=darkred]
> > > can look these things up?
> > >
> > > thanks in advance!
> > > --
> > >
> > >
> > > Br,
> > > Mark Broadbent
> > > mcdba , mcse+i
> > > =============
> > >
> > >
> > >[/color][/color]
>
>
>[/color]
Nov 16 '05 #7

Mark Broadbent
P: n/a
Mark Broadbent
That was partly my point that you will notice that you can declaratively
access part of the System.Runtime.Remoting namespace *without* adding a
reference to the remoting.dll. However some classes of the namespace was
missing which I could only make available by referencing this dll. This
really is the basis for my question because (like your assumption) you would
have thought that everything that belongs to remoting would be accessible
through the remoting.dll; wheras you will find that alot is accessible
without referencing this. Hence I believe that this namespace spans several
dlls ... and the bit that is being exposed to me I think can be found in the
mscorlib.dll.
Please have a try with intellisense (or view mscorlib via object browser)
and you will see what I mean.
I can only assume that things have been designed like this to reduce file
library sizes, and to only expose essential classes in namespaces for design
reasons.

P.S. I am pretty sure that remoting is not the only namespace that spans
dlls like this.

I hope I made more sense.
--


Br,
Mark Broadbent
mcdba , mcse+i
=============
"John Wood" <j@ro.com> wrote in message
news:%23Zadt$dXEHA.1000@TK2MSFTNGP12.phx.gbl...[color=blue]
> I think you'll find the remoting namespaces are held in a separate DLL
> called System.Runtime.Remoting.dll.
>
> --
> John Wood
> EMail: first name, dot, last name, at priorganize.com
> "Mark Broadbent" <no-spam-please@no-spam-please.com> wrote in message
> news:%23oBaS7dXEHA.3292@TK2MSFTNGP09.phx.gbl...[color=green]
> > 1. makes sense, thought that might be reason. Question is where am I[/color]
> picking[color=green]
> > up the initial remoting classes from? -At a guess I'd say there is a
> > System.Runtime.Remoting namespace defined in mscorlib.dll (which I think[/color]
> Im[color=green]
> > right in saying is referenced automatically). Certainly if I look at it[/color]
> thru[color=green]
> > object browser it certainly seems that way.
> >
> > 2. Thx for this link. I was kind of hoping the documentation for all
> > namespaces/ classes config in Xml docs would be in one place but I guess
> > I'll have to see what I can find on a class by class basis. Still thx[/color][/color]
for[color=blue][color=green]
> > this starting point.
> >
> > --
> >
> >
> > Br,
> > Mark Broadbent
> > mcdba , mcse+i
> > =============
> > "John Wood" <j@ro.com> wrote in message
> > news:uSly0pdXEHA.2716@tk2msftngp13.phx.gbl...[color=darkred]
> > > 1. I think the trade-off of having some namespaces in separate[/color][/color]
> assemblies[color=green]
> > is[color=darkred]
> > > really down to the size of the assembly and the likelihood that it[/color][/color][/color]
will[color=blue]
> be[color=green][color=darkred]
> > > referenced. Loading an assembly takes time, so they want to reduce the[/color]
> > size[color=darkred]
> > > of the default assemblies as much as possible. Namespaces like[/color][/color][/color]
Remoting[color=blue][color=green]
> > and[color=darkred]
> > > Windows.Forms are great candidates for splitting off into separate
> > > assemblies because they are large namespaces and used only in specific
> > > circumstances.
> > >
> > > 2. The remoting configuration file format is all documented in MSDN.
> > >[/color]
> >[/color]
>[/color]
http://msdn.microsoft.com/library/en...asp?frame=true[color=blue][color=green][color=darkred]
> > >
> > > --
> > > John Wood
> > > EMail: first name, dot, last name, at priorganize.com
> > > "Mark Broadbent" <no-spam-please@no-spam-please.com> wrote in message
> > > news:OvHJUTdXEHA.1152@TK2MSFTNGP09.phx.gbl...
> > > > Hi guys, just going through remoting at the moment and a couple of
> > > questions
> > > > relating to .net in general has surfaced.
> > > > Firstly I have seen in the designer that for the namespace and many[/color][/color][/color]
of[color=blue][color=green]
> > its[color=darkred]
> > > > associated classes of System.Runtime.Remoting are available, but[/color][/color]
> certain[color=green][color=darkred]
> > > > ones are not. A reference to System.Runtime.Remoting needs to be[/color][/color][/color]
added[color=blue][color=green]
> > to[color=darkred]
> > > > make available all the unavailable ones. Now although I (think)[/color]
> > understand[color=darkred]
> > > > the concept that an assembly needs to be referenced in order for its
> > > classes
> > > > and other members to be exposed to the designer, I cant quite get my[/color]
> > head[color=darkred]
> > > > around why some classes of certain namespaces are available and[/color][/color][/color]
others[color=blue][color=green][color=darkred]
> > > > arent -until a reference is made to this assembly. Is this simply a[/color]
> > design[color=darkred]
> > > > issue that certain parts of a namespace have been exposed in certain
> > > > assemblies. Could someone explain how this works and why it has been[/color]
> > done?[color=darkred]
> > > >
> > > > The second part of my question relates to XML elements and[/color][/color][/color]
attributes[color=blue]
> of[color=green][color=darkred]
> > > > config files. Having looked at an example of storing certain[/color][/color]
> predefined[color=green][color=darkred]
> > > > elements for remoting config it has occurred to me that there must[/color][/color][/color]
be[color=blue][color=green]
> > some[color=darkred]
> > > > kind of reference for this XML based language to configure things at
> > > > runtime. For instance I might have known how to register a client
> > > activated
> > > > channel in c# code, but how would I have known that...
> > > > {snippet!!}
> > > > <channels>
> > > > <channel ref="http" port="1234" />
> > > > </channels>
> > > > ..would have done the same thing. Therefore there must be somewhere[/color][/color]
> that[color=green]
> > I[color=darkred]
> > > > can look these things up?
> > > >
> > > > thanks in advance!
> > > > --
> > > >
> > > >
> > > > Br,
> > > > Mark Broadbent
> > > > mcdba , mcse+i
> > > > =============
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


Nov 16 '05 #8

Mark Broadbent
P: n/a
Mark Broadbent
will try that sometime when Im not so busy. Thanks fo that tip -will be
interesting to see the results.

--


Br,
Mark Broadbent
mcdba , mcse+i
=============
"Christian Heide Damm" <ChristianHeideDamm@discussions.microsoft.com> wrote
in message news:F5ACEF8A-3DDD-4AF4-8970-A50403C6CAA9@microsoft.com...[color=blue]
> There is some file that defines the _default switches_ for csc.exe.[/color]
MsCorLib is certainly referenced by default.[color=blue]
>
> If you try to run "csc.exe /nostdlib ....", then you'll probably get lots[/color]
of compile errors since you're missing the basic stuff (e.g.,
Console.WriteLine).[color=blue]
>
> Christian
>
> ---
>
> "Mark Broadbent" wrote:
>[color=green]
> > 1. thx. You'll see though that if you create a project and remove all
> > references, you can still access part of the System.Runtime.Remoting
> > namespace in code (try intellisense to see that it does) -I think these
> > types are in the mscorlib.dll.
> >
> >
> > --
> >
> >
> > Br,
> > Mark Broadbent
> > mcdba , mcse+i
> > =============
> > "Christian Heide Damm" <ChristianHeideDamm@discussions.microsoft.com>[/color][/color]
wrote[color=blue][color=green]
> > in message news:E9CCC5BC-38C7-4CF4-BE62-42556DB8F0B5@microsoft.com...[color=darkred]
> > > 1)
> > > A namespace can be distributed over several assemblies. A namespace[/color]
> > doesn't really exist in an assembly - each type in the assembly just[/color][/color]
happen[color=blue][color=green]
> > to have a fully qualified name that consists of several parts.[/color][/color]
Therefore,[color=blue][color=green]
> > it's possible that you see some System.Runtime.Remoting types in one
> > assembly and others in another assembly.[color=darkred]
> > >
> > > However, I would expect all System.Runtime.Remoting.* types to be[/color][/color][/color]
located[color=blue][color=green]
> > in System.Runtime.Remoting.dll assembly, i.e., I don't understand how[/color][/color]
you[color=blue][color=green]
> > can see some of the types without a reference to
> > System.Runtime.Remoting.dll. Try to run ildasm.exe on the assemblies[/color][/color]
that[color=blue][color=green]
> > you do have references to - and see what types they contain.[color=darkred]
> > >
> > > 2)
> > > I don't know where the reference is. But in addition to the "standard"[/color]
> > stuff, it's possible to add your own configuration information in that[/color][/color]
file[color=blue][color=green]
> > and then read it at runtime.[color=darkred]
> > >
> > > Christian
> > >
> > > ---
> > >
> > > "Mark Broadbent" wrote:
> > >
> > > > Hi guys, just going through remoting at the moment and a couple of[/color]
> > questions[color=darkred]
> > > > relating to .net in general has surfaced.
> > > > Firstly I have seen in the designer that for the namespace and many[/color][/color][/color]
of[color=blue][color=green]
> > its[color=darkred]
> > > > associated classes of System.Runtime.Remoting are available, but[/color][/color][/color]
certain[color=blue][color=green][color=darkred]
> > > > ones are not. A reference to System.Runtime.Remoting needs to be[/color][/color][/color]
added[color=blue][color=green]
> > to[color=darkred]
> > > > make available all the unavailable ones. Now although I (think)[/color]
> > understand[color=darkred]
> > > > the concept that an assembly needs to be referenced in order for its[/color]
> > classes[color=darkred]
> > > > and other members to be exposed to the designer, I cant quite get my[/color]
> > head[color=darkred]
> > > > around why some classes of certain namespaces are available and[/color][/color][/color]
others[color=blue][color=green][color=darkred]
> > > > arent -until a reference is made to this assembly. Is this simply a[/color]
> > design[color=darkred]
> > > > issue that certain parts of a namespace have been exposed in certain
> > > > assemblies. Could someone explain how this works and why it has been[/color]
> > done?[color=darkred]
> > > >
> > > > The second part of my question relates to XML elements and[/color][/color][/color]
attributes of[color=blue][color=green][color=darkred]
> > > > config files. Having looked at an example of storing certain[/color][/color][/color]
predefined[color=blue][color=green][color=darkred]
> > > > elements for remoting config it has occurred to me that there must[/color][/color][/color]
be[color=blue][color=green]
> > some[color=darkred]
> > > > kind of reference for this XML based language to configure things at
> > > > runtime. For instance I might have known how to register a client[/color]
> > activated[color=darkred]
> > > > channel in c# code, but how would I have known that...
> > > > {snippet!!}
> > > > <channels>
> > > > <channel ref="http" port="1234" />
> > > > </channels>
> > > > ...would have done the same thing. Therefore there must be somewhere[/color]
> > that I[color=darkred]
> > > > can look these things up?
> > > >
> > > > thanks in advance!
> > > > --
> > > >
> > > >
> > > > Br,
> > > > Mark Broadbent
> > > > mcdba , mcse+i
> > > > =============
> > > >
> > > >
> > > >[/color]
> >
> >
> >[/color][/color]


Nov 16 '05 #9

Sunny
P: n/a
Sunny
Hi,

I believe that the classes, defined in mscorlib.dll are those parts of
the remoting, which make use of the cross appdomain buildin memory
channels, used behind the scenes, when you just pass a reference of an
object between 2 appdomains in your process, or those one, used for com
interop.

The other classes, which are responsible for creating channels and all
other remoting stuff are located at their own assembly.

Sunny


In article <#9vLo9dXEHA.3188@TK2MSFTNGP09.phx.gbl>, no-spam-please@no-
spam-please.com says...[color=blue]
> 1. thx. You'll see though that if you create a project and remove all
> references, you can still access part of the System.Runtime.Remoting
> namespace in code (try intellisense to see that it does) -I think these
> types are in the mscorlib.dll.
>
>
>[/color]
Nov 16 '05 #10

Sunny
P: n/a
Sunny
Hi,

even so far noone from MS have confirmed this problem, it seems that it
exists and there is a memory leak when you use config files.

Please, read this article:

http://www.genuinechannels.com/Conte...x?id=88&type=1

Sunny

In article <#oBaS7dXEHA.3292@TK2MSFTNGP09.phx.gbl>, no-spam-please@no-
spam-please.com says...[color=blue]
> 1. makes sense, thought that might be reason. Question is where am I picking
> up the initial remoting classes from? -At a guess I'd say there is a
> System.Runtime.Remoting namespace defined in mscorlib.dll (which I think Im
> right in saying is referenced automatically). Certainly if I look at it thru
> object browser it certainly seems that way.
>
> 2. Thx for this link. I was kind of hoping the documentation for all
> namespaces/ classes config in Xml docs would be in one place but I guess
> I'll have to see what I can find on a class by class basis. Still thx for
> this starting point.
>
>[/color]
Nov 16 '05 #11

John Wood
P: n/a
John Wood
Yep I agree. A lot of the remoting infrastructure is used for other things..
the real tcp channel management stuff is probably in the DLL.
That's the great thing about .net, the fact you can span one namespace over
multiple DLLs.

--
John Wood
EMail: first name, dot, last name, at priorganize.com

"Sunny" <sunnyask@icebergwireless.com> wrote in message
news:ebasppeXEHA.3676@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hi,
>
> I believe that the classes, defined in mscorlib.dll are those parts of
> the remoting, which make use of the cross appdomain buildin memory
> channels, used behind the scenes, when you just pass a reference of an
> object between 2 appdomains in your process, or those one, used for com
> interop.
>
> The other classes, which are responsible for creating channels and all
> other remoting stuff are located at their own assembly.
>
> Sunny
>
>
> In article <#9vLo9dXEHA.3188@TK2MSFTNGP09.phx.gbl>, no-spam-please@no-
> spam-please.com says...[color=green]
> > 1. thx. You'll see though that if you create a project and remove all
> > references, you can still access part of the System.Runtime.Remoting
> > namespace in code (try intellisense to see that it does) -I think these
> > types are in the mscorlib.dll.
> >
> >
> >[/color][/color]


Nov 16 '05 #12

Mark Broadbent
P: n/a
Mark Broadbent
think that just about wraps that one up.

--


Br,
Mark Broadbent
mcdba , mcse+i
=============
"Mark Broadbent" <no-spam-please@no-spam-please.com> wrote in message
news:OvHJUTdXEHA.1152@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hi guys, just going through remoting at the moment and a couple of[/color]
questions[color=blue]
> relating to .net in general has surfaced.
> Firstly I have seen in the designer that for the namespace and many of its
> associated classes of System.Runtime.Remoting are available, but certain
> ones are not. A reference to System.Runtime.Remoting needs to be added to
> make available all the unavailable ones. Now although I (think) understand
> the concept that an assembly needs to be referenced in order for its[/color]
classes[color=blue]
> and other members to be exposed to the designer, I cant quite get my head
> around why some classes of certain namespaces are available and others
> arent -until a reference is made to this assembly. Is this simply a design
> issue that certain parts of a namespace have been exposed in certain
> assemblies. Could someone explain how this works and why it has been done?
>
> The second part of my question relates to XML elements and attributes of
> config files. Having looked at an example of storing certain predefined
> elements for remoting config it has occurred to me that there must be some
> kind of reference for this XML based language to configure things at
> runtime. For instance I might have known how to register a client[/color]
activated[color=blue]
> channel in c# code, but how would I have known that...
> {snippet!!}
> <channels>
> <channel ref="http" port="1234" />
> </channels>
> ..would have done the same thing. Therefore there must be somewhere that I
> can look these things up?
>
> thanks in advance!
> --
>
>
> Br,
> Mark Broadbent
> mcdba , mcse+i
> =============
>
>[/color]


Nov 16 '05 #13

Post your reply

Help answer this question



Didn't find the answer to your C# / C Sharp question?

You can also browse similar questions: C# / C Sharp