Page 1 of 1

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

Posted: Thu Nov 24, 2016 2:57 pm
by bygones
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)

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

Posted: Fri Nov 25, 2016 12:30 pm
by RobinHood42
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

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

Posted: Fri Nov 25, 2016 1:18 pm
by odklizec
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?

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

Posted: Tue Nov 29, 2016 9:06 am
by bygones
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

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

Posted: Tue Nov 29, 2016 9:16 am
by odklizec
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.

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

Posted: Fri Jan 13, 2017 1:11 pm
by odklizec
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 ;)