
使用Microsoft Visual Web Developer 開發Web程式,當程式撰寫完畢後,正心高彩烈的想把自已寫好程式進行打包時,卻發現怎麼找不到此功能,確實VWD下無法直接進行打包的動作,因此需要自行DIY,雖然有點給他小麻煩,但微軟能如此的仁慈提供這麼方便且又免費的開發工具,麻煩也算是應該的,但也沒想像中的那麼麻煩,只需要簡單幾步驟就可完成compiler。
Step1
開啟控制台/ 系統管理工具 / Internet Information Services,在【預設的網站】按下滑鼠右鍵,選擇新增 / 虛擬目錄。

Step2
設定別名,請自行設定或依照下列的範例。

Step3
選擇待會要打包的資料夾。

Step4
按下完成鈕,以完成新建。

Step5
開啟記事本,輸入下列的原始碼再儲存為compiler.cmd。
compiler.cmd Code
cd<br />
C:
cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
aspnet_compiler.exe -v myweb -fixednames c:\myweb
說明:myweb:需與剛所設定的別名相同。
c:\myweb :打包後所要存放位置。
Step6
雙響剛所製作好的
compiler.cmd,此時則會出現如下方的畫面,表示正在進行打包的動作。

Step7
開啟剛所打包的存放位置,則會發現.cs的檔不見了,其實已經打包成.dll並存放在bin的資料夾中。
