【问题标题】:Azure Function couldn't load 'System.UriTemplate'Azure 函数无法加载“System.UriTemplate”
【发布时间】:2019-03-09 20:59:13
【问题描述】:

我正在使用 .Net Standart for Azure Function,它与服务总线处理消息一起使用。一旦我的函数运行,我遇到了以下异常:

Microsoft.ServiceBus:“Microsoft.ServiceBus.Messaging.Constants”的类型初始化程序引发了异常。 Microsoft.ServiceBus:无法从程序集“System.ServiceModel,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”加载类型“System.UriTemplate”

我已经安装了以下软件包:
1. Microsoft.Azure.WebJobs
2.Microsoft.Azure.WebJobs.ServiceBus
3.System.ServiceModel.Primitives

任何想法为什么会发生?

【问题讨论】:

  • 您能否提供文件functionappname.csproj中的功能代码和项目信息等详细信息?
  • 这可能是您的 nuget 包之间的版本不一致或 System.ServiceModel 缺少适当的 nuget 的问题。不幸的是,Functions 中无法进行程序集重定向,因此请尝试匹配包和版本。

标签: c# .net-core azure-functions .net-standard


【解决方案1】:

请尝试问题https://github.com/dotnet/wcf/issues/2824中提到的解决方法

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-10-13
    • 2018-11-29
    • 1970-01-01
    • 2018-09-10
    • 2020-11-01
    • 2019-02-07
    • 1970-01-01
    相关资源
    最近更新 更多