I have a Winforms project and I have the latest NET6
(currently 6.0.4) version installed.
I'm using RestSharp
and when I created the RestClient
I get the following exception:
File or Assembly "System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" not found.
The RestSharp nuget package dependencies show:
In App.config
I also having the following bindings:
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.4" newVersion="6.0.0.4" />
</dependentAssembly>
I also tried using Newtonsoft.Json
instead as explained here, but I get the same exception above.
Any solution to this problem?