共用方式為


HOW TO:編譯並執行基本遠端應用程式

下列程序說明如何使用 隨附的命令列工具來編譯 HOW TO:建置可遠端處理的型別HOW TO:建置裝載應用程式,以及 HOW TO:建置用戶端應用程式等主題中建立的基本遠端應用程式。這些主題當中,每個主題內含的指示都能讓您建立包含稱為 typeclient,以及 listener 子目錄的 remoting 目錄。

若要編譯並執行基本遠端應用程式

  1. remoting\type 目錄的命令提示字元上,輸入下列命令:

    vbc /t:library RemotableType.vb
    csc /noconfig /t:library RemotableType.cs
    
  2. RemotableType.dll 複製到 remoting\clientremoting\listener 目錄。

  3. listener.exe.config 複製到 remoting\listener 目錄。

  4. client.exe.config 複製到 remoting\client 目錄。

  5. remoting\listener 目錄的命令提示字元上,輸入下列命令:

    vbc /r:RemotableType.dll Listener.vb
    csc /noconfig /r:RemotableType.dll Listener.cs
    
  6. remoting\client 目錄的命令提示字元上,輸入下列命令:

    vbc /r:RemotableType.dll client.vb
    csc /noconfig /r:RemotableType.dll Listener.cs csc /noconfig /r:RemotableType.dll Client.cs 
    
  7. remoting\listener 目錄的命令提示字元上,輸入 Listener

  8. Listener 應用程式執行時,於 remoting\client 目錄中開啟新的命令提示字元,然後輸入 Client.

請參閱

其他資源

建置基本 .NET Framework 遠端處理應用程式

Footer image

Copyright © 2007 by Microsoft Corporation. All rights reserved.