我正在尝试将dotnet核心应用发布到Azure.我创建了一个发布配置文件,并使用Visual Studio正常运行.但是,由于我想设置连续部署,因此我需要使用命令行来运行部署.
I'm trying to publish a dotnet core app to Azure. I've created a publish profile and using visual studio it all works fine. But since I'd like to setup continuous deployment I need to run the deployment using command line.
官方文档在确定[ProfileName].ps1
是最佳的攻击计划.
The official documentation was pretty helpful in identifying that the [ProfileName].ps1
is the best plan of attack.
但是,它不提供有关如何使用它的任何线索. 首先,我在没有参数的情况下运行它,并得到了这个错误:
However it gives no clues on how to use it. First I ran it without parameters and got this error:
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
接下来,我添加了所需的参数:
Next I added the needed parameters:
.\Production-publish -packOutput 'C:\code\my-dotnetcore-proj\publish' -pubProfilePath 'Production.pubxml'
哪一个都没有错误但没有做任何事情!
Which ran without error but didn't do ANYTHING!
如何通过Powershell使Azure部署工作正常?
How can I make the Azure depoyment via Powershell work?