Results 1 to 10 of 10

Thread: System.Runtime.Remoting.Channels.Tcp ???

  1. #1

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103

    Question System.Runtime.Remoting.Channels.Tcp ???

    Why?

    Why when I try to compile this simple sample (hehe) MS VS tell me that the

    System.Runtime.Remoting.Channels.Tcp

    Namespace does noe exists???

    Then I try to compile it with csc.exe by dos prompt and all work fine???

    Why???

    --- code ---
    PHP Code:
    using System;
    using System.Runtime.Remoting;
    using System.Runtime.Remoting.Channels;
    using System.Runtime.Remoting.Channels.Tcp;

    namespace 
    RemotingSamples 
    {
        public class 
    Sample 
        
    {

            public static 
    int Main(string [] args
            {

                
    TcpChannel chan = new TcpChannel(8085);
                
    ChannelServices.RegisterChannel(chan);
                
    RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType("RemotingSamples.HelloServer,object"), "SayHello"WellKnownObjectMode.SingleCall);
                
    System.Console.WriteLine("Hit <enter> to exit...");
                
    System.Console.ReadLine();
                return 
    0;
            }
        }

    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I would expect it new bug . It's number 1000

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Have you added a reference to the dll?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103
    Have you added a reference to the dll?
    Thanks, that's the trick

    But I does not understand why I have to add it in VS and not in the csc command line...

    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    The references thing is there for a reason I don't really understand.

    The command line compiler doesn't care for it and always uses everything it can find.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    csc.exe probably by default references the common .NET libraries. i guess it was written that way.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7
    Lively Member
    Join Date
    Aug 1999
    Location
    Amsterdam
    Posts
    117
    Csc.exe uses a response file, it's like a compiler configuration file. Take a look at 'C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\csc.rsp'. A reference to System.Runtime.Remoting.dll, which you were missing in VS, is automatically added when use csc from the commandline.

  8. #8

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103
    Take a look at 'C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\csc.rsp'. A reference to System.Runtime.Remoting.dll, which you were missing in VS, is automatically added when use csc from the commandline.
    But... VS does not launch the csc.exe?
    If yes, why VS need a different references list?

    Thanx
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  9. #9
    Lively Member
    Join Date
    Aug 1999
    Location
    Amsterdam
    Posts
    117
    No, VS doesn't run csc.exe.

  10. #10
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    what does it use then? it wont use an own compiler do it?
    \m/\m/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width