When I updated to the latest version of Ranorex 10.1.1 I get alot of Newtonsoft-conflicts!
When I imported the new Ranorex.dlls in Visual Studio (I write my test/automation code myself in VS - I do not use Ranorex Studio at all) all hell broke loose. I updated from 9.2 to 10.1.0 yesterday and that seemed to work just fine. Today I updated to 10.1.1 and then the problems started.
It seems like the DLLs are suddenly exposing Newtonsoft and you get namespace conflicts. I tried to mitigate that, but in the end I ended up with this error:
Error CS0433 The type 'JProperty' exists in both 'Ranorex.Plugin.WinForms.Contracts.Core, Version=10.1.1.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a' and 'Ranorex.Plugin.Wpf.Contracts.Core, Version=10.1.1.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a' ......
Is the exposing of Newtonsoft intentional in the first place? After I tried to mitigate the issue I ended up with the error above where there is a conflict within the Ranorex dlls themselfs? I have no idea how to handle that.
I integrate Ranorex like this:
https://www.ranorex.com/help/latest/int ... tegration/
Newtonsoft conflict! Ranorex developers!
Re: Newtonsoft conflict! Ranorex developers!
Can add the the first error(s) I got after changing dlls were:
Error CS0433 The type 'JToken' exists in both 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and 'Ranorex.Plugin.WinForms.Contracts.Core, Version=10.1.1.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a'....
Obviously it get many of these erros.
It works if I create a new blank solution and import the ddls, so there is a conflict in my test solution since Newtonsoft.Json is already there. It seems more difficult to handle that one first might think.
Basically I just don't understand why Ranorex would like to do it like this, it's not so nice....
Best regards,
Error CS0433 The type 'JToken' exists in both 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and 'Ranorex.Plugin.WinForms.Contracts.Core, Version=10.1.1.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a'....
Obviously it get many of these erros.
It works if I create a new blank solution and import the ddls, so there is a conflict in my test solution since Newtonsoft.Json is already there. It seems more difficult to handle that one first might think.
Basically I just don't understand why Ranorex would like to do it like this, it's not so nice....
Best regards,
Re: Newtonsoft conflict! Ranorex developers!
My mistake as probably that I had included Ranorex.Plugin.*.dll as references in the solution, but that included a couple of dlls that should not have been there. Once realising that I had copied too many dlls it builds and runs again.
Re: Newtonsoft conflict! Ranorex developers!
As of 10.1.0 Ranorex is based on .Net framework 4.8. https://www.ranorex.com/release-notes/ This may require some updates of other dependencies such as Newtonsoft to a version that also uses .NET framework 4.8.