c:\windows\microsoft\framework\v2.0.50727aspnet_compiler -v test c:\tmp\test
-v test 指定虛擬目錄名稱c:\tmp\test 為編譯輸出路徑test 目錄部署至正式伺服器。aspnet_regiis.exe 加密。亦可使用 ClientBuildManager 類別在程式中執行預編譯:
string vdir = "/MyDataSource";
string srcLocation = @"c:\Inetpub\wwwroot\VS2005IDE";
string tarLocation = @"c:\tmp\VS2005IDE";
ClientBuildManager cbm = new ClientBuildManager(vdir, srcLocation, tarLocation);
cbm.PrecompileApplication();