[英]Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' in Azure Functions
I am refering a C# library project from my Azure Function (Service bus queue trigger). 我从Azure函数(服务总线队列触发器)引用了C#库项目。 The library is referencing the Newtonsoft nuget version 10.0.1. 该库引用的是Newtonsoft nuget版本10.0.1。 While running the function locally on my visual studio, it gives this error . 在我的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"}
I tried downgrading to version 10.0.0, but the issue is there. 我尝试降级到10.0.0版,但是问题就在那里。
I stumbled upon this issue link : https://github.com/Azure/azure-functions-vs-build-sdk/issues/107 . 我偶然发现了这个问题链接: https : //github.com/Azure/azure-functions-vs-build-sdk/issues/107 。 And tried downgrading to 9.0.1. 并尝试降级到9.0.1。 But even then the error still occurs. 但是即使那样,错误仍然会发生。
Note: The library project reference several other library projects which are also referencing Newtonsoft. 注意:库项目引用了其他几个库项目,这些项目也都引用了Newtonsoft。 I am keeping the same version of the nuget all the sub projects. 我在所有子项目中都使用相同版本的nuget。
How to solve this issue? 如何解决这个问题?
将所有子库中的所有Newtonsoft dll指向版本9.0.1解决了该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.