List Info

Thread: C-Sharp (C#) Group: Canīt access to System.Runtime.R




C-Sharp (C#) Group: Canīt access to System.Runtime.R
user name
2006-01-13 17:39:51
Hi,

Iīm working on a simple Remoting client/server application
example,
but Iīm having trouble s when trying to access the
System.Runtime.Remoting.Channels.Tcp namespace. Why Iīm
getting "The
type or namespace name 'Tcp' does not exist in the namespace
'System.Runtime.Remoting.Channels' (are you missing an
assembly
reference?)" when compiling this code?

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels.Tcp;
using RemotingServer;

There is no more in MSDN documentation, what Iīm missing?

Thanks in advance

C-Sharp (C#) Group: Re: Canīt access to System.Runti
user name
2006-01-13 18:10:40
You'll need to add a reference to your project to the System.Runtime.Remoting dll.  Right click on References, Add References, Look for and select the System.Runtime.Remoting dll.  You should then be able to access that Tcp namespace.

On 1/13/06, iCeCLoW < iceclowgmail.com">iceclowgmail.com> wrote:

Hi,

Iīm working on a simple Remoting client/server application example,
but Iīm having trouble s when trying to access the
System.Runtime.Remoting.Channels.Tcp namespace. Why Iīm getting "The
type or namespace name 'Tcp' does not exist in the namespace
'System.Runtime.Remoting.Channels' (are you missing an assembly
reference?)&quot; when compiling this code?

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Remoting ;
using System.Runtime.Remoting.Channels.Tcp;
using RemotingServer;

There is no more in MSDN documentation, what Iīm missing?

Thanks in advance


C-Sharp (C#) Group: Re: Canīt access to System.Runti
user name
2006-01-14 01:18:30
That is! Thanks Marty, it works,  but I donīt understand why
I have to
add a reference to the System.Runtime.Remoting dll to only
access Tcp
namespace and I can access Remoting and Channels namespaces
without
adding it?

C-Sharp (C#) Group: Re: Canīt access to System.Runti
user name
2006-01-14 05:16:47
Think of it as two separate projects in the same solution.&nbsp; Although the solution is System, there could be any number of projects that have the System root namespace.  So you've got one project that has a namespace of System.Runtime.Remoting.Channnels, but there is another&nbsp; project that has a namespace of System.Runtime.Remoting .Channels.Tcp. Since they are two different projects, they compile into two separate binaries.
 
I assume that the situation is similar to the namespaces in question within Microsoft...

 
On 1/13/06, iCeCLoW < iceclowgmail.com">iceclowgmail.com> wrote:

That is! Thanks Marty, it works,&nbsp; but I donīt understand why I have to
add a reference to the System.Runtime.Remoting dll to only access Tcp
namespace and I can access Remoting and Channels namespaces without
adding it?


C-Sharp (C#) Group: Re: Canīt access to System.Runti
user name
2006-01-17 07:19:29
iCeCLoW wrote:
> That is! Thanks Marty, it works,  but I donīt
understand why I have to
> add a reference to the System.Runtime.Remoting dll to
only access Tcp
> namespace and I can access Remoting and Channels
namespaces without
> adding it?
>
>
>   
Hi iCeLoW,

There are two namespaces you use here, one is
System.Runtime.Channels, 
and the other is System.Runtime.Channels.Tcp. Although the
second one is 
under the first one from a tree view, they are different for
compiler.

Open the Object Browser by View -> Object Browser, click
the "mscorlib" 
assembly which is referred by a project by default, and
expand it. You 
can find a node called
"System.Runtime.Remoting.Channels", but no node 
called "System.Runtime.Remoting.Channels.Tcp".
That is why you can 
access Channels namespace instead of Tcp. You should add
another 
assembly which contains the Tcp namespace in order to acess
it. Now you 
have to add a reference to System.Runtime.Remoting.dll.

You can use the Object Browser to check whether or not the
namespace you 
expected is under System.Runtime.Remoting.dll.

-- 
Thanks,
Bo
Messenger ID: hbharrypattonhotmail.com

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )