0
ASP.NET CoreアプリケーションのアーティファクトをAzure Web Serviceに展開するPowerShellスクリプトが必要です。私はそれにそれがスクリーンショットに示されている方法を使用していますASP.NET CoreアーティファクトをAzureに展開するためのPowerShellスクリプト
param($websiteName, $packOutput)
$website = Get-AzureWebsite -Name $websiteName
Stop-AzureWebsite -Name $websiteName
# get the scm url to use with MSDeploy. By default this will be the second in the array
$msdeployurl = $website.EnabledHostNames[1]
$publishProperties = @{'WebPublishMethod'='MSDeploy';
'MSDeployServiceUrl'=$msdeployurl;
'DeployIisAppPath'=$website.Name;
'Username'=$website.PublishingUsername;
'Password'=$website.PublishingPassword
}
$publishScript = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Scripts\1.2.0\default-publish.ps1"
. $publishScript -publishProperties $publishProperties -packOutput $packOutput
Start-AzureWebsite -Name $websiteName
:インターネットを検索する私はこのスクリプトを見つけることができた
しかし...何も場合msdeployコマンド実行の結果として起こりません。エラーは発生せず、データは展開されません。
PowerShellでASP.NET Core成果物を展開する正しい方法は何ですか?
私はVSがスクリプトを生成することを知っていますが、私はそれらを動作させることはできません。 VSスクリプト './DemoDeploy - Web Publish-publish.ps1 -packOutput" Webサイトの成果物へのパス "-pubProfilePath" VSによって生成されたプロファイルへのパス "で次のコマンドを試しました。結果は上のスクリーンショットとほぼ同じです。私は以前に提供されたリンクを見てきましたが、それも私を助けませんでした。私はjsonファイルが生成されていることを確認していませんが(ドキュメントで使用しています)、VS ps1スクリプトは例で使用するパラメータを持っていないようです。動作する使用例を教えてください。 – pasul