【发布时间】:2019-01-23 14:45:08
【问题描述】:
我正在尝试从 azure 函数将消息添加到 azure 消息队列。为此,我正在关注这篇文章,它让我添加了对 Microsoft.Azure.ServiceBus 的引用。
尝试添加此引用时,Visual Studio 2017 中的 Azure 函数项目抱怨 Newtonsoft.Json (=9.0.1) 相对于 Microsoft.NET.Sdk.Functions 引用的受限版本。
检测到 Newtonsoft.Json 的版本冲突。安装/参考 Newtonsoft.Json 10.0.1 直接到project IHA.Functions来解决 这个问题。 IHA.Functions -> Microsoft.Azure.ServiceBus 3.1.0 -> System.IdentityModel.Tokens.Jwt 5.2.2 -> Newtonsoft.Json (>= 10.0.1)
IHA.Functions -> Microsoft.NET.Sdk.Functions 1.0.14 -> Newtonsoft.Json (= 9.0.1)。 IHA.Functions C:\TFS\IHA\Misc\IHA.CSL\IHA.Functions\IHA.Functions.csproj 1
据我了解,Microsoft.Azure.ServiceBus 需要 Newtonsoft.Json 10.0.1。如果我删除9.0版本并添加10.0版本,我可以成功添加Microsoft.Azure.ServiceBus包,但是Azure Functions项目抱怨Microsoft.NET.Sdk.Functions需要Newtonsoft 9.0。
基于这些理解,我似乎无法从 Azure 函数写入 Azure 消息队列。这是正确的还是我做错了什么?
【问题讨论】:
标签: azure-functions azureservicebus