ExtensionAttribute conflict when referencing Ranorex.Libs

Class library usage, coding and language questions.
lyn5000
Posts: 50
Joined: Mon Feb 13, 2012 5:52 pm

ExtensionAttribute conflict when referencing Ranorex.Libs

Post by lyn5000 » Wed Dec 12, 2012 12:52 am

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: ExtensionAttribute conflict when referencing Ranorex.Libs

Post by Support Team » Thu Dec 13, 2012 11:19 am

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)
.
Image