The predefined type xxx is in the global alias.... messages

Ask general questions here.
bygones
Posts: 31
Joined: Fri Nov 27, 2015 11:32 am

The predefined type xxx is in the global alias.... messages

Post by bygones » Thu Nov 24, 2016 2:57 pm

Hi,

since newly I have a bunch of warnings in the project I dont know how to address them

Code: Select all

The predefined type 'System.Runtime.CompilerServices.AsyncStateMachineAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)
The predefined type 'System.Runtime.CompilerServices.ICriticalNotifyCompletion' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)
The predefined type 'System.Runtime.CompilerServices.INotifyCompletion' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)
The predefined type 'System.Runtime.CompilerServices.IAsyncStateMachine' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)
The predefined type 'System.Runtime.CompilerServices.AsyncVoidMethodBuilder' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)
The predefined type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)
The predefined type 'System.Runtime.CompilerServices.CallerMemberNameAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)
The predefined type 'System.Runtime.CompilerServices.CallerFilePathAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)
The predefined type 'System.Runtime.CompilerServices.CallerLineNumberAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' (CS1685)

User avatar
RobinHood42
Posts: 237
Joined: Fri Jan 09, 2015 3:24 pm

Re: The predefined type xxx is in the global alias.... messages

Post by RobinHood42 » Fri Nov 25, 2016 12:30 pm

Hi,

There's most likely an issue with your .NET framework. Please try to clean-up/re-install installed versions of the .NET framework. Also, check the referenced assemblies within your Ranorex project, there might be an issue with them.

Cheers,
Robin

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: The predefined type xxx is in the global alias.... messages

Post by odklizec » Fri Nov 25, 2016 1:18 pm

What version of .Net Target Framework and Ranorex are you using? I don't see such error in Ranorex 6.1.1 and Target Framework 4.5.1. Try to update .Net and Ranorex and see if it still happens.

BTW, I've recently saw this kind of warning during Ranorex "Combining Automated Functional and Load Testing" webinar ;) I guess it's a .Net thing?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

bygones
Posts: 31
Joined: Fri Nov 27, 2015 11:32 am

Re: The predefined type xxx is in the global alias.... messages

Post by bygones » Tue Nov 29, 2016 9:06 am

odklizec wrote:What version of .Net Target Framework and Ranorex are you using? I don't see such error in Ranorex 6.1.1 and Target Framework 4.5.1. Try to update .Net and Ranorex and see if it still happens.

BTW, I've recently saw this kind of warning during Ranorex "Combining Automated Functional and Load Testing" webinar ;) I guess it's a .Net thing?
it also appeared right after I installed the nuget package from the webinar...

I have Ranorex 6.1.0 and .Net v4.0

I will update them and see whats happening

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: The predefined type xxx is in the global alias.... messages

Post by odklizec » Tue Nov 29, 2016 9:16 am

So it's most probably related to the Neoload integration? ;) I'm personally waiting for 6.1.2 as they mentioned (during webinar) that there is a problem with 6.1.1 regarding Neoload integration.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: The predefined type xxx is in the global alias.... messages

Post by odklizec » Fri Jan 13, 2017 1:11 pm

Just in case anyone else stumbles upon this issue, it's caused by incorrectly copied content from NEOLOAD_README.txt. There is a warning in Ranorex-NeoLoad integration guide, that there must be copied only <assemblyBinding> tag and all its child tags! If you copy entire xml code and copy it to app.config, it will cause the above error. I just found it the hard way by misreading the instructions ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration