【发布时间】:2017-03-15 04:27:41
【问题描述】:
我正在尝试将 dotnet 核心应用程序发布到 Azure。我创建了一个发布配置文件并使用 Visual Studio 一切正常。但由于我想设置持续部署,我需要使用命令行运行部署。
official documentation 非常有助于确定[ProfileName].ps1 是最佳攻击计划。
但是它没有提供如何使用它的线索。 首先我在没有参数的情况下运行它并得到了这个错误:
Production-publish.ps1 : The term 'Production-publish.ps1' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ Production-publish.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Production-publish.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
接下来我添加了需要的参数:
.\Production-publish -packOutput 'C:\code\my-dotnetcore-proj\publish' -pubProfilePath 'Production.pubxml'
运行没有错误但没有做任何事情!
如何通过 Powershell 进行 Azure 部署?
【问题讨论】:
标签: asp.net asp.net-core azure-web-app-service web-deployment continuous-deployment