gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 19:54:57 26 4
gpt4 key购买 nike

我正在本地开发一个 Azure 函数,并打开了存储模拟器和 de Storage Explorer。

文件树

File tree

local.settings.json

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

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

Missing value for AzureWebJobsStorage in local.settings.json. This is required for all triggers other than HTTP. You can run 'func azure functionapp fetch-app-settings ' or specify a connection string in local.settings.json

它在重建解决方案之前就可以工作,如果我尝试 func azure functionapp fetch-app-settings <functionAppName>它尝试从 azure 门户本身检索信息。

最佳答案

The solution was to right-click on local.settings.json, go to properties, change "Copy to Output directory" from "Do not copy" to "Copy always". Now the CLI picks up the settings when running from within Visual Studio 2017.

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

关于azure - Visual Studio 2017 中的 local.settings.json 本地开发中缺少 AzureWebJobsStorage 的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48907751/

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