Unable to install System.text.json package

I get this error when I am installing system.text.json package!

Cannot load assembly: C:\Users\nuget\packages\system.text.json/4.7.0\lib/net461/System.Text.Json.dll : System.TypeLoadException: Method ‘DisposeAsync’ in type ‘System.Text.Json.Utf8JsonWriter’ from assembly ‘System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ does not have an implementation.
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at UiPath.Studio.Plugin.Workflow.Services.AssemblyContainer.AddAssemblyInternal(Assembly assembly, String path)
at UiPath.Studio.Plugin.Workflow.Services.AssemblyContainer.<>c__DisplayClass9_0.b__0(Tuple`2 range)

can anybody help?

Hello,

I’ve got the same issue. It seems to be a bug in UiPath. I solved that issue by using the Package Newtonsoft.Json.

Kind regards,
Tino

1 Like

Can you please share those steps?

Hi All

I couldn’t publish the package, i got this error
" Unexpected error has occurred during the library compilation process:
Could not load file or assembly ‘System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies. The system cannot find the file specified."
Can anyone please help me?

I have the same issue, it seems to be related to the Microsoft 365 library, different versions (currently trying 2.1.1. The only version that works seem so be 1.11.1.

My code is i a library (c#) and works just fine when running the individual activities inside the library, but I can’t publish it as I get this message:

Reason was ‘Could not load file or assembly ‘System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies. The system cannot find the file specified.’.

Did you find a solution to this?

Why do you need it? Everything you need to work with JSON is included in UiPath.System.Activities via the included Newtonsoft.Json library.