Page 1 of 1

ExtensionAttribute conflict when referencing Ranorex.Libs

Posted: Wed Dec 12, 2012 12:52 am
by lyn5000
Upgraded to Ranorex 4 and then loaded my 3.3.3 solution in Ranorex 4.
After it had converted the projects to Ranorex 4, they each had a reference added to Ranorex.Libs.

Then building in Ranorex Studio gives:
-Error:
Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' (CS0656)
-Warning:
The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\assembly\GAC_MSIL\Ranorex.Libs\4.0.0.20817__b798506b574ebc9a\Ranorex.Libs.dll' (CS1685)

Building in Visual Studio instead gives no error, just warning:
The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll'

So there is a conflict between whether to use ExtensionAttribute from Ranorex.Libs or System.Core.dll.

If I remove the reference to Ranorex.Libs there is no more error or warning.

However, I want to use Ranorex.Libs since there are useful public classes available such as the ones in the Newtonsoft.Json.Linq namespace.

Re: ExtensionAttribute conflict when referencing Ranorex.Libs

Posted: Thu Dec 13, 2012 11:19 am
by Support Team
Hello,

Unfortunately, this is a bug in version 4.0.0.
It will be fixed in version 4.0.1 (Release within the next few weeks)

Regards,
Markus (T)