Partilhar via


How to: Compile and Run a Basic Remoting Application

This topic is specific to a legacy technology that is retained for backward compatibility with existing applications and is not recommended for new development. Distributed applications should now be developed using the Windows Communication Foundation (WCF).

The following procedure shows how to use the command-line tools that ship with the .NET Framework SDK to compile the basic remoting application built in the topics How to: Build a Remotable Type, Building a Host Application, and How to: Build a Client Application. The instructions in each of these topics had you create a remoting directory with subdirectories called type, client, and listener.

To compile and run a basic remoting application

  1. At the command prompt in the remoting\type directory, type the following command:

    vbc /t:library RemotableType.vb
     [C#]
    csc /noconfig /t:library RemotableType.cs
    
  2. Copy RemotableType.dll into the remoting\client and remoting\listener directories.

  3. Copy listener.exe.config into the remoting\listener directory.

  4. Copy client.exe.config into the remoting\client directory.

  5. At the command-prompt in the remoting\listener directory, type the following command:

    vbc /r:RemotableType.dll Listener.vb
    csc /noconfig /r:RemotableType.dll Listener.cs
    
  6. At the command-prompt in the remoting\client directory, type the following command:

    vbc /r:RemotableType.dll client.vb
    csc /noconfig /r:RemotableType.dll Listener.cs csc /noconfig /r:RemotableType.dll Client.cs 
    
  7. At the command prompt in the remoting\listener directory, type Listener.

  8. When the Listener application is running, open a new command prompt in the remoting\client directory and type Client.

See Also

Other Resources

Building a Basic .NET Framework Remoting Application