調用命令列產生Visuial Studio.NET項目、解決方案

來源:互聯網
上載者:User

devenv solutionfile.sln  /build solutionconfig [ /project projectnameorfile [ /projectconfig name ] ]

可用的命令列開關:

/build                     產生指定的解決方案配置
/project                 指定產生項目而不是解決方案
                             必須指定 /build 才能使用 /project
/projectconfig        指定要產生的項目配置
                             必須指定 /project 才能使用 /projectconfig
/out                       將產生結果寫入指定的檔案
/rebuild                 與 /build 類似,但先執行強制清理
/clean                    清理產生結果
/deploy                  產生指定的解決方案配置然後部署它
/run                       運行指定的解決方案配置
/runexit                  運行指定的解決方案配置然後終止
/command             啟動後執行指定的內部命令列
/mditabs                使用選項卡式文檔介面
/mdi                      使用 MDI 介面
/fn                         使用指定的字型名稱
/fs                         使用指定的字型大小
/LCID                   使用指定的語言識別碼
/noVSIP                禁用用於 VSIP 測試的VSIP 開發人員許可證密鑰
/safemode              出於穩定性僅載入預設的環境和服務
/resetskippkgs       允許曾被標記為載入失敗的 VsPackages再次載入
/migratesettings      遷移另一個版本中的某些使用者佈建

產品特定的開關:

實踐項目一:通過命令列編譯整個解決方案
        假設現在有這麼一個解決方案,C:/TestCommandLine/TestCommandLine.sln。在命令列狀態下輸入下列命令列,可以編譯出此解決方案的Release版本,若要獲得Debug版本,將Release替換成Debug即可:
        devnev C:/TestCommandLine/TestCommandLine.sln /build Release

PS:.NET 2003下的MFC, C#, ASP.NET, VB.NET均測試通過,該解決方案可以只包含一個項目,也可以是N層架構的大型應用。

實踐項目二:通過命令列編譯一個解決方案中的某個項目
        假設現在有這麼一個解決方案(C#),C:/TestCommandLine/TestCommandLine.sln,它包含2個項目:一個是Project1.csproj,另一個是Project2.csproj,通過如下命令列可以編譯Project1的Release版本:
        devnev C:/TestCommandLine/TestCommandLine.sln /build Release /project C:/TestCommandLine/TestCommandLine.csproj

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.