在遠程Web服務器上,我安裝了遠程服務http://x.x.x.x/MsDeployAgentService。如何使用VS2010便捷式發佈(MsDeploy)從命令行進行遠程部署?
如果我使用Web VS2010中的應用項目的發佈命令,我可以成功地發佈到該遠程Web服務器和更新特定IIS網站。
我想現在要做的是在命令行中執行此功能。
我猜測這是兩個步驟。
msbuild "C:\MyApplication\MyWebApplication.csproj"
/T:Package /P:Configuration=Release
然後發出MsDeploy命令將它發佈/同步與刪除IIS服務器:
msdeploy -verb:sync
-source:package="C:\MyApplication\obj\Release\Package\MyWebApplication.zip"
-dest:contentPath="My Production Website",
computerName=http://x.x.x.x/MsDeployAgentService,
username=adminuser,password=adminpassword
不幸的是我得到一個錯誤首先使用相關的構建配置構建Web應用程序項目:
Error: (10/05/2010 3:52:02 PM) An error occurred when the request was processed on the remote computer.
Error: Source (sitemanifest) and destination (contentPath) are not compatible for the given operation. Error count: 1.
我已經嘗試了數目標提供不同的組合,但沒有喜悅:(
有沒有人設法複製VS2010 Web應用程序項目「一鍵」從命令行發佈?
更新:製造一點點進步,命令: msdeploy -verb:同步 - 源:清單= 「C:\ MyApplication的\ OBJ \發佈\包\ MyWebApplication.SourceManifest.xml」 -dest:汽車,計算機名= XXXX,用戶名= admin,密碼= XYZ 會連接,但失敗,錯誤......當請求是在遠程計算機上處理髮生 錯誤。錯誤:當'setAcl'提供程序與物理路徑一起使用時,必須指定'setAclUser'設置的值。 嗯,有什麼想法? – David 2010-05-14 08:35:19