Azure Functions-发布 local.settings.json

标签 azure azure-functions

如何发布我的 Azure Function 的 local.settings.json?

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "CosmoDbAuthKey": "***********************************",
    "CosmoDbEndpoint": "https://**************************:443/",
    "CosmosDbId": "***Notifications"
  }
}

最佳答案

此答案并不容忍发布 local.settings.json 文件的做法,因为它仅用于本地开发和调试。其他人已经强调了这一点,但他们显然错误地认为“无法发布”。确实有一个发布它的方法,它在Microsoft's online docs中指定。 :

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. Note that values in ConnectionStrings are never published.

关于Azure Functions-发布 local.settings.json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62669606/

相关文章:

Azure CLI : Accept SendGrid's legal terms

swift - Azure 通知中心无法注册具有可用内容的模板

asp.net - DevOps 管道中的发布任务因导入项目未找到错误而失败

.net - 有没有一种方法可以从多个 .NET 项目创建一个 Azure Function App,并拥有所有这些项目的所有 Functions?

Python Azure Functions 和 Bitbucket Pipelines - 如何压缩需求?

azure - 设计 Azure Functions 以从多个事件中心读取事件的最佳方法

针对不受支持的区域的 Azure Maps API 解决方法

azure - 在哪里可以找到用 Powershell 编写的 Http 触发器函数的应用服务日志?

azure - 限制 Azure Function 只执行一次

c# - 如何从 MVC4 中的 web.config 获取字符串值