如何使用预编译的 Azure Functions 解决“无法从 Azure WebJobs SDK 调用”错误?

Ian*_*Ian 5 .net f# azure .net-core azure-functions

我有一个预编译的 Azure Functions 的 .NET Standard 2.0 类库。当我使用 CLI 在本地运行它们时,一切都运行良好。存储绑定是通过属性完成的。

通过 CLI 发布到 Azure 后,我仅在尝试运行 HTTP 触发函数时收到此神秘错误:

{
  "id": "4de8aa2a-73cf-4978-8aef-492310858379",
  "requestId": "03f813ea-0390-4262-a44d-f6646cb96e68",
  "statusCode": 500,
  "errorCode": 0,
  "message": "'[Function Name]' can't be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes?"
}
Run Code Online (Sandbox Code Playgroud)

我怎样才能知道这要求什么?我不知道它是我的代码中的内容还是我需要在函数应用程序中配置的内容。

Ian*_*Ian 2

将函数应用程序运行时版本选项更改为beta(运行时版本:2.0.11415.0)似乎可以让我的函数应用程序正常工作