我已经安装了azure-tools-vscode,但不知道如何使用它来发布 Azure 功能:
我尝试过的一些步骤是:
Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.
PS D:\azurenodejsfunctions>
PS D:\azurenodejsfunctions> func azure login
PS D:\azurenodejsfunctions> func azure account set <SubscriptionId>
PS D:\azurenodejsfunctions> func azure functionapp publish ..\azurenodejsfunctions\
Publish D:\azurenodejsfunctions contents to an Azure Function App. Locally deleted files are not removed from destination.
Getting site publishing info...
Can't find app with name "..\azurenodejsfunctions\" in current subscription.
PS D:\azurenodejsfunctions>
我尝试了另一种方式,手动创建了 azure function app,然后尝试:
PS D:\> func azure functionapp publish azurenodejsfunctions
Exception :
Unable to find function project root. Expecting to have host.json in function project root.
文件和文件夹结构,
现在对我来说是个谜。关于为什么会发生这种情况以及如何解决这个问题的任何想法?