【问题标题】:What version of WindowsAzure.Storage is supported by Azure Functions v3?Azure Functions v3 支持哪个版本的 WindowsAzure.Storage?
【发布时间】:2022-01-20 05:50:24
【问题描述】:

我正在使用带有 dot net 3.1 运行时堆栈的 Azure Functions V3,并且具有使用 9.3.3 版的 WindowsAzure.Storage SDK 处理存储 Blob 的业务逻辑。当我运行函数应用程序时,我收到此错误:

System.MissingMethodException: '找不到方法:'System.Collections.Generic.IEnumerable`1 Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.ListBlobs(System.String, Boolean , Microsoft.WindowsAzure.Storage.Blob.BlobListingDetails, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions, Microsoft.WindowsAzure.Storage.OperationContext)'。'

我想知道WindowsAzure.Storage SDK 的哪个版本与 Azure Functions V3 兼容。对此的任何帮助将不胜感激。

【问题讨论】:

    标签: azure azure-functions azure-storage


    【解决方案1】:

    对于 .NET 应用程序,新的扩展版本还更改了您可以绑定的类型,将 WindowsAzure.StorageMicrosoft.Azure.Storage 中的类型替换为 Azure.Storage.Blobs 中的新类型,并在以下 documentation 中通知。

    此 SO 线程可帮助您来自 how to replace Microsoft.WindowsAzure.Storage with Microsoft.Azure.Storage.Blob

    如果您正在使用带有 .Net 3.1 的 WindowsAzure.Storage.Queue,请参考 here

    【讨论】:

    • 您好,Hari Krishna Rajoli,感谢您的回答。我的团队目前没有计划进行任何 SDK 升级。我们与WindowsAzure.Storage 有一些依赖关系。有没有办法通过 .net core 3.1 的 V3 功能解决此错误?
    • WindowsAzure.Storage 已弃用,最新版本 9.3.3 已于 2018 年 11 月发布。尽管它仍然有效且尚未停止支持,但建议移至较新的 Azure.Storage.Blobs包以利用更好的性能、更新、功能发布和未来的持续支持。支持请参考storage extensions of Azure functions
    • 我不是要求支持这个已弃用的软件包,而只是在可能的情况下解决我的问题中的这个错误
    • 能否详细说明您在哪一步遇到此错误?
    • 我有一个定时器触发函数,我调用了一个方法来列出所有的 blob,只要我调用我的方法,我就会得到这个错误。无论如何,我现在已经通过升级到最新版本的 SDK Azure.Storage.Blobs 解决了这个问题,但仍然不确定实际原因。
    猜你喜欢
    • 1970-01-01
    • 2016-08-15
    • 2022-06-21
    • 1970-01-01
    • 1970-01-01
    • 2021-03-26
    • 2014-07-31
    • 2020-01-05
    • 1970-01-01
    相关资源
    最近更新 更多