【问题标题】:Azure Function 2.0 Dependency injection errorAzure Function 2.0 依赖注入错误
【发布时间】:2020-02-14 03:10:19
【问题描述】:

在 Azure Function 3.0 之前,我的应用程序可以正常运行,但在 Microsoft 更新之后。即使我将 Function 应用程序部署在 Azure 上,它也无法工作,它会返回依赖注入错误。为什么 MS 升级版本会破坏现有版本?我真的很沮丧。

【问题讨论】:

  • 你能显示你的函数的.csproj文件和Startup.cs吗?
  • 那么您使用的是什么版本的 Azure Functions?
  • 这是我的包,我正在使用 V2:

标签: azure .net-core azure-functions asp.net-core-2.0 azure-durable-functions


【解决方案1】:

只需重新安装/更新以下软件包:

<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.5" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.3" />

【讨论】:

  • 它没有解决 V2 问题。我刚刚将 Function 应用更新到 V3。
猜你喜欢
  • 2023-03-03
  • 1970-01-01
  • 2021-05-30
  • 2013-04-19
  • 1970-01-01
相关资源
最近更新 更多