Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' in Azure Functions

不打扰是莪最后的温柔 提交于 2019-12-11 06:45:40

问题


I am refering a C# library project from my Azure Function (Service bus queue trigger). The library is referencing the Newtonsoft nuget version 10.0.1. While running the function locally on my visual studio, it gives this error .

{"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.

I stumbled upon this issue link : https://github.com/Azure/azure-functions-vs-build-sdk/issues/107. And tried downgrading to 9.0.1. But even then the error still occurs.

Note: The library project reference several other library projects which are also referencing Newtonsoft. I am keeping the same version of the nuget all the sub projects.

How to solve this issue?


回答1:


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



来源:https://stackoverflow.com/questions/47351068/could-not-load-file-or-assembly-newtonsoft-json-version-10-0-0-0-culture-neut

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!