在Visual Studio 2017的local.settings.json本地开发中缺少AzureWebJobsStorage的值

rubens.lopes:

我正在本地打开azure函数,同时打开了Storage Emulator和de Storage Explorer。

文件树

文件树

local.settings.json

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "AzureWebJobsDashboard": "UseDevelopmentStorage=true"
  },
  "ConnectionStrings": {
    "PlantaoEntities": {
      "ConnectionString": "CENSORED",
      "ProviderName": "System.Data.EntityClient"
    }
  }
}

但是当尝试运行代码时,a收到以下消息:

local.settings.json中缺少AzureWebJobsStorage的值。除HTTP之外,所有其他触发器都需要此设置。您可以运行'func azure functionapp fetch-app-settings'或在local.settings.json中指定连接字符串

在重建解决方案之前它一直在工作,如果我尝试func azure functionapp fetch-app-settings <functionAppName>尝试从天蓝色门户网站本身检索信息。

rubens.lopes:

解决方案是右键单击local.settings.json,转到属性,将“复制到输出目录”从“不复制”更改为“始终复制”。现在,CLI在Visual Studio 2017中运行时将获取设置。

https://github.com/Azure/azure-functions-core-tools/issues/223#issuecomment-326225219

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章