I am writing a v2 Azure Durable Function. When passing a C# object to a helper activity Function, I get a runtime error in my custom JsonConverter
used in serializing the type being passed. The custom JsonConverter
is in a library that must reference Newtonsoft.Json 12.x, while Microsoft.NET.Sdk.Functions is locked into 11.0.2.
jObject error CS1705: Assembly 'ContractLibrary' with identity 'ContractLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' which has a higher version than referenced assembly 'Newtonsoft.Json' with identity 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
I believe this GitHub Issue is relevant. This comment on that Issue seems to indicate that adding Newtonsoft.Json 12.x as a direct dependency of your Function project may help. This helped in another Function project, but now I have hit this wall again. Is there anything I can do to mitigate this?