Closed JeroenJSmit closed 1 year ago
Hi @JeroenJSmit Thanks for update.Will check and confirm the same.
Any news on this issue?
@fabiocav pls comment and validate.
This is an in-proc function I am assuming? The functions host uses Newtonsoft.Json/13.0.2 at runtime, referencing 13.0.3
is not recommended as this version will not be loaded at runtime (13.0.2 will be loaded). Newtonsoft.Json only introduced IAsyncDIsposable in 13.0.3, which is why this fails at runtime.
If you wish to use 13.0.3
, I suggest using dotnet isolated functions: https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
hope the soln provided work if not raise new req
Summary
When upgrading a Function App (Net 6, Functions V4) to using the latests version of "Newtonsoft.Json" (13.0.3) the construction "await using" on a JsonTextReader instance throws an exception: Entry point was not found
Known workarounds
Repro In VS 2022 (17.5.1), create a new Function App (V4, .Net 6.0) with an Http trigger. Add the following package references:
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
As a smallest repro, use the following code in the HttpTrigger:
Call the trigger and the following exception is thrown and logged:
Of course a void implementation but also when actually processing a stream with data this exception occurs. Note that the same construction works fine from unit tests, a console app and WebAPI.
Expected behavior No exception is thrown when the JsonTextReader is disposed.