1

我正在从我的 Azure 函数(服务总线队列触发器)中引用一个 C# 库项目。该库引用 Newtonsoft nuget 版本 10.0.1。在我的 Visual Studio 上本地运行该功能时,它会出现此错误。

{"Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.":"Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed"}

我尝试降级到版本 10.0.0,但问题就在那里。

我偶然发现了这个问题链接:https ://github.com/Azure/azure-functions-vs-build-sdk/issues/107 。并尝试降级到 9.0.1。但即便如此,错误仍然存​​在。

注意:库项目引用了其他几个也引用 Newtonsoft 的库项目。我在所有子项目中保持相同版本的 nuget。

如何解决这个问题?

4

1 回答 1

0

Pointing all the Newtonsoft dlls in all the sub libraries to version to 9.0.1 solved the issue.

于 2017-11-21T12:40:09.197 回答