[Mono-devel-list] Why "Cannot find type 'TcpChannel'"?

Lluis Sanchez lluis at ximian.com
Sun Jul 31 14:21:35 EDT 2005


You need to reference the System.Runtime.Remoting assembly. You can do
it compiling with the option /r:System.Runtime.Remoting.


El dg 31 de 07 del 2005 a les 19:14 +0200, en/na Nenad Lecek va
escriure:
> Dear all,
> 
> I just started with Mono, version 1.1.8 on WinXP with SP1 and failed
> to compile example bellow with following error:
> 
> C:\Projects\Mono\examples\remoting\example8_my>mcs server.cs
> server.cs(10) error CS0246: Cannot find type 'TcpChannel'
> Compilation failed: 1 error(s), 0 warnings
> 
> What should be done to use TcpChannel with Mono?
> Thanks.
> 
> Best regards
> Nenad
> 
> File "server.cs":
> 
> ______________________________________________________________________
> using System;
> using System.Runtime.Remoting;
> using System.Runtime.Remoting.Channels;
> //using System.Runtime.Remoting.Channels.Tcp;
> 
> public class CoHello : MarshalByRefObject
> {
>     public static void Main()
>     {
>         TcpChannel channel = new TcpChannel(4000);
>         ChannelServices.RegisterChannel(channel);
>         
>         RemotingConfiguration.RegisterWellKnownServiceType
> (typeof(CoHello), "HelloDotNet", WellKnownObjectMode.Singleton);
>         System.Console.WriteLine("Hit <enter> to exit ...!");
>         System.Console.ReadLine();
>     }
>     
>     public void SayHallo()
>     {
>         Console.WriteLine("Hello, Universe of .Net and Mono");
>     }
> }
> 
> ______________________________________________________________________
> 
> 
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list