Azure Function App无法加载IOptionsFormatter [英] Azure Function App failing to load IOptionsFormatter

查看:59
本文介绍了Azure Function App无法加载IOptionsFormatter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在尝试在本地运行的C#Azure功能应用程序.几个月前它曾经运行良好,但现在却失败了:

I have a C# Azure Function App that I'm trying to run locally. It previously had worked fine some months ago but is now failing with the following:

发生主机错误
Microsoft.Azure.WebJobs.Extensions.Storage:无法从程序集"Microsoft.Azure.WebJobs.Host,版本= 3.0.3.0,文化=中性,PublicKeyToken = 31bf3856ad364e35"中加载类型"Microsoft.Azure.WebJobs.Hosting.IOptionsFormatter"

A host error has occurred
Microsoft.Azure.WebJobs.Extensions.Storage: Could not load type 'Microsoft.Azure.WebJobs.Hosting.IOptionsFormatter' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

在某个时候,我已经将 Azure函数和Web作业工具更新为最新版本(15.10.20460.0).

At some point I had updated the Azure Functions and Web Jobs Tools to the latest version (15.10.20460.0).

在启动时,在对函数进行索引时遇到了问题,因此我将 Microsoft.NET.Sdk.Functions nuget包引用更新为最新版本(1.0.24),现在可以为我提供以上功能错误.

On startup, it was having problems indexing the functions so I updated the Microsoft.NET.Sdk.Functions nuget package reference to the latest version (1.0.24) which is now giving me the above error.

我还为 Microsoft.Azure.WebJobs.Extensions.Storage 3.0.3添加了nuget包引用,以解决同样出现的丢失的 TableAttribute 错误.

I also added a nuget package reference to Microsoft.Azure.WebJobs.Extensions.Storage 3.0.3 to resolve the missing TableAttribute errors that appeared as well.

我已经检查了bin文件夹中具有以下版本的程序集:

I've checked the assemblies in the bin folder which have the following versions:

  • Microsoft.Azure.WebJobs.Extensions.Storage.dll-v3.0.3.0
  • Microsoft.Azure.WebJobs.Host.dll-v3.0.4.0

推荐答案

Microsoft.Azure.WebJobs.Extensions.Storage 的Nuget软件包参考从最新版本-3.0.3更改为3.0.2解决了这个问题.

Changing the Nuget Package Reference for Microsoft.Azure.WebJobs.Extensions.Storage from the latest version - 3.0.3 to 3.0.2 resolves the issue.

运行功能项目现在可以成功启动,并且不会显示任何错误.

Running the function project now launches successfully with no errors displayed.

这篇关于Azure Function App无法加载IOptionsFormatter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆