gpt4 book ai didi

c# - 右键单击部署时如何运行 --publish-local-settings?

转载 作者:行者123 更新时间:2023-11-30 22:56:13 26 4
gpt4 key购买 nike

在函数应用上执行右键单击 --> 部署时,我们如何提供 --publish-local-settings 开关?

enter image description here

documentation状态:

By default, these settings are not migrated automatically when the project is published to Azure. Use the --publish-local-settings switch when you publish to make sure these settings are added to the function app in Azure.

最佳答案

简短的回答?你不能。该标志适用于 func.exe 命令行工具,而不是 Visual Studio 右键单击​​发布。

长答案:从屏幕截图来看,您似乎正在使用 Visual Studio,是吗?默认情况下,Visual Studio 不会将 local.settings.json 文件发布到 Azure。人们期望您的本地开发设置可能与您想要发布的设置不同。他们正在将您推向成功的深渊。

要从 Visual Studio 内部发布设置,请遵循文档 here ...

The easiest way to upload the required settings to your function appin Azure is to select the Manage Azure App Service settings linkthat appears after you successfully publish your project.

enter image description here

Selecting this link displays the Application settings dialog forthe function app, where you can add new application settings or modifyexisting ones.

enter image description here

如果您真正希望使用您引用的--publish-local-settings标志,那么可以使用azure函数核心工具命令行来实现工具,func.exe

更多信息here .

示例命令:func azure functionapppublish Function_App_Name --publish-local-settings

关于c# - 右键单击部署时如何运行 --publish-local-settings?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54557804/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com