パラメーター/p:DeployOnBuild=True
が渡されたときにMSBuildによって生成されたProjectName.deply.cmdを実行しようとしています。引数 "ComputerName"の1つはhttps://WebServer01:8172/MSDeploy.axd?SiteName=MySiteName
として渡されます。私のコマンドラインは、それが実行される実際のコマンドは、/ M https://WebServer01:8172/MSDeploy.axd?Site=MySiteName
の引数を2つの引数に分割し、これされていることをProjectName.deploy.cmdでサイト名を渡す方法
"C:\Program Files\IIS\Microsoft Web Deploy V3\\msdeploy.exe"
-source:package='Y:\ProjectName.zip'
-dest:auto,computerName='https://WebServer01:8172/MSDeploy.axd?Site',userName='DeployUserName',password='Password',authtype='Basic',includeAcls='False'
-verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension
-disableLink:CertificateExtension
-setParamFile:"Y:\ProjectName.SetParameters.xml"
MySiteName
-AllowUntrusted
お知らせです
Error: Unrecognized argument 'MySiteName'. All arguments must begin with "-".
を返し
ProjectName.deploy.cmd /Y /M:https://WebServer01:8172/MSDeploy.axd?Site=MySiteName
-AllowUntrusted /U:DeployUserName /P:Password /A:Basic
だろうcomputerName='https://WebServer01:8172/MSDeploy.axd?Site'
と追加の引数MySiteName
を作成します。
私はRunning a deployment package with quoted parameters fails in Visual Studio 2010 Service Pack 1を経由しましたが、それは唯一のArgMsDeployAdditionalFlags
の引数ではなく、例えば注意します。 /M:ComputerName
。
サイト名が渡されていない場合、私は、サーバー上で管理者権限を持っていたユーザーに展開罰金を行うことができますが、標準のIISユーザーDeployUserNameが、私は401
ProjectName.deploy.cmd /Y /M:https://WebServer01:8172/MSDeploy.axd
-AllowUntrusted /U:DeployUserName /P:Password /A:Basic
を取得する使用されている場合、サーバーは401を返します。
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("WebServer01") using the Web
Management Service, but could not authorize. Make sure that you are using the
correct user name and password, that the site you are connecting to exists, and
that the credentials represent a user who has permissions to access the site.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error: The remote server returned an error: (401) Unauthorized.
そのユーザーの権限は、ユーザーがうまく機能することを利用しMSDeploy
でVS2012
からパブリッシュプロファイルとして罰金です。私もmsdeploy.exe
コマンドをビルドすることができ、それもうまく動作します。私はProjectName.deploy.cmd
をTeam Build
の一部として生産されているのでTFS2010
から使用しなければなりません。
これは質問のタイプミスです。私はそれを修正した。問題は議論そのものではありません。方法=はコマンドプロンプトで処理され、deploy.cmdスクリプトで整理され、さらにmsdeploy.exeに渡されます。 –
@amit_g - 最新の回答をご覧ください。 –
私はこれを他のバリエーションと一緒に試してみて、その逃げ道を取ったと確信していますが、その日は一人も働いていませんでした。(今日私はこれを使い始めました。この作業で、私は配備ユーザに管理者権限を必要としません(これは私が望んだものです)。ありがとうございます@リチャードあなたの助けになりました。 –