我正在从我的 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。
如何解决这个问题?