So, I have a WebJob project that needed updating. I was running into DLL issues which was solved by this post:
https://github.com/Azure/azure-webjobs-sdk/issues/1633
The last comment states:
I would recommend folks use the more recent versions:
Microsoft.Azure.WebJobs (2.2.0)
Microsoft.NET.Sdk.Functions (1.0.21)
Newtonsoft.Json (9.0.1)
So that is what I did and my WebJob compiles. Great. Or so I thought. It turns out that my shared DLL uses the latest version of Newtonsoft's Json.Net (12.0.1) which is now throwing an error when I run my WebJob.
This is the error I am getting:
A ScriptHost error has occurred [29/11/2018 10:17:08] Cormar.Extensions: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. [29/11/2018 10:17:08] Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. [29/11/2018 10:17:08] Cormar.Extensions: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Does anyone know how I can get around this?