Hello,
I have Newtonsoft.Json.dll used in my solution (MS VS2010), version 4.5.11
Also, I'm using Ranorex.Libs.dll which also contains (sinse 4.0.2) Newtonsoft.Json of some another version, due to that I have a lot of problems with my project.
I can't just stop using Newtonsoft.Json v4.5.11 and use yours one.
How can I resolve this issue or could you please fix it somehow?
(we have bought licenses for 4.0.x but can't use 4.0.x at the moment because of that issues)
Thanks!
Ranorex 4.0.2 and Newtonsoft.Json
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 3:30 pm
- Location: Graz, Austria
Re: Ranorex 4.0.2 and Newtonsoft.Json
Hello,
Which kind of problems do you have in your project using the DLL?
Could you please send us the error message in order to analyze the issue in more detail? Are you sure that you use the right bit version of the DLL?
Thank you!
Regards,
Bernhard
Which kind of problems do you have in your project using the DLL?
Could you please send us the error message in order to analyze the issue in more detail? Are you sure that you use the right bit version of the DLL?
Thank you!
Regards,
Bernhard
-
- Posts: 8
- Joined: Fri Feb 22, 2013 11:19 am
Re: Ranorex 4.0.2 and Newtonsoft.Json
Hello, I've downloaded newtonsoft.json from here http://json.codeplex.com/releases/view/97986
and simply included Bin\Net40\Newtonsoft.Json.dll from there
and, I'm using Ranorex 32-bit dlls:
Ranorex.Libs
Ranorex.Plugin.Web
Ranorex.Core
Here are error messages types
Error 12 No overload for method 'Value' takes 0 arguments
one more types:
Error 4 Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
have no idea what is it.
Warning 10 The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'Ranorex.Libs.dll'
p.s.
sorry to say I can't Ranorex Studio project file as far as I don't use it. I work in MSVS2010
and simply included Bin\Net40\Newtonsoft.Json.dll from there
and, I'm using Ranorex 32-bit dlls:
Ranorex.Libs
Ranorex.Plugin.Web
Ranorex.Core
Here are error messages types
Error 12 No overload for method 'Value' takes 0 arguments
Code: Select all
[language=csharp]
JObject jObject = JObject.Parse(response.streamResponse); //some repsonse
JToken groupList = jObject["groupList"]; //some obj
var someValue = groupList[0]["name"].Value<string>(); //here we have: No overload for method 'Value' takes 0 arguments
[/language]
Error 4 Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
have no idea what is it.
Warning 10 The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'Ranorex.Libs.dll'
p.s.
sorry to say I can't Ranorex Studio project file as far as I don't use it. I work in MSVS2010
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 3:30 pm
- Location: Graz, Austria
Re: Ranorex 4.0.2 and Newtonsoft.Json
Hello,
Please find some ideas below:
Error 12:
Please try to debug your stored objects for solving this issue.
Error 4:
This error message could mean a number of different things.
You could try to remove this reference and add it again e.g.
Please take a look at this post at stackoverflow.
Warning 10:
You would need to add a specific alias for your library since Newtonsoft.Json is included in Ranorex.Libs as well. If you don't need Ranorex.Libs you could simply delete it.
Otherwise please add an alias for Ranorex.Libs and use it as described in our blog:
http://www.ranorex.com/blog/using-ranor ... me-project
Regards,
Markus (T)
Please find some ideas below:
Error 12:
Please try to debug your stored objects for solving this issue.
Error 4:
This error message could mean a number of different things.
You could try to remove this reference and add it again e.g.
Please take a look at this post at stackoverflow.
Warning 10:
You would need to add a specific alias for your library since Newtonsoft.Json is included in Ranorex.Libs as well. If you don't need Ranorex.Libs you could simply delete it.
Otherwise please add an alias for Ranorex.Libs and use it as described in our blog:
http://www.ranorex.com/blog/using-ranor ... me-project
Regards,
Markus (T)
-
- Posts: 8
- Joined: Fri Feb 22, 2013 11:19 am
Re: Ranorex 4.0.2 and Newtonsoft.Json
Thanks! That help a lot and resolved my issue:
I've added alias for standard Newtonsoft.Json.dll
according to http://www.ranorex.com/blog/using-ranor ... me-project
and, finally managed to exclude Ranorex.Libs from my project.
P.S.
I removed custom alias from reference to Newtonsoft.Json.dll after Ranorex.Libs had been excluded from project.
That's all! Thanks again.
I've added alias for standard Newtonsoft.Json.dll
Code: Select all
[language=csharp]
extern alias NewtonJSON;
using NewtonJSON.Newtonsoft.Json;
using NewtonJSON.Newtonsoft.Json.Linq;
[/language]
and, finally managed to exclude Ranorex.Libs from my project.
P.S.
I removed custom alias from reference to Newtonsoft.Json.dll after Ranorex.Libs had been excluded from project.
That's all! Thanks again.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 3:30 pm
- Location: Graz, Austria