Problems with .NET 4.5

Ask general questions here.
SanMan
Posts: 147
Joined: Tue Apr 13, 2010 9:59 am

Problems with .NET 4.5

Post by SanMan » Thu Mar 05, 2015 10:55 am

I have installed Ranorex 5.3 and .NET 4.5.2
OS: WIN7
q1.PNG
q1.PNG (2.01 KiB) Viewed 3072 times
q2.PNG
q2.PNG (18.3 KiB) Viewed 3072 times
Should the .NET Runtime Version be shown 4.5.x ?

Should I be able to select Target Framework: . NET Framework 4.5 ?

I get this warning:
The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
(link does not work). Is there something wrong in my environment?

I have a AUT that needs .NET 4.5.x and have now problem tracking.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Problems with .NET 4.5

Post by krstcs » Thu Mar 05, 2015 5:23 pm

Ranorex does not support versions of .NET higher than 4.0. This is because Ranorex is built on SharpDevelop 3.2, which also does not support .NET higher than 4.0. It will not even recognize that you have 4.5 installed.
Shortcuts usually aren't...

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

Re: Problems with .NET 4.5

Post by Support Team » Thu Mar 05, 2015 11:09 pm

krstcs wrote:Ranorex does not support versions of .NET higher than 4.0.
Sorry, but this is not 100% correct. Ranorex does both support automation of applications developed with .NET 4.5 and also supports targeting the .NET 4.5 framework with Ranorex Studio.

However, the .NET 4.5 SDK is not part of the .NET 4.5 runtime installation package, so you have to download and install it separately.
As soon as you have the SDK installed, the .NET Framework 4.5 should be available in the Compiling options of your Ranorex project.
krstcs wrote:This is because Ranorex is built on SharpDevelop 3.2
This is correct and that is also why the code editor does not support highlighting of new language features delivered with C# 5.0 (which is part of .NET 4.5), like the "await" keyword.
SanMan wrote:I have a AUT that needs .NET 4.5.x and have now problem tracking.
The .NET SDK should not be needed for automating .NET 4.5 applications. Could it be that this is rather a security limitation? Please, make sure that Ranorex is started with the same (or higher) privileges as the AUT.
Please try starting the standalone Ranorex Spy (not within Ranorex Studio) as Administrator.

Regarding the .NET Runtime Version displayed in the screenshot SanMan posted:
The version of the .NET Runtime did not change with the .NET 4.5 runtime framework, it is still 4.0.
Yeah, I know, the .NET version numbers are really misleading :?

Regards,
Alex
Ranorex Team
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Problems with .NET 4.5

Post by krstcs » Tue Mar 10, 2015 2:03 pm

Alex,

Thank you for the clarification, however, I have found that .NET 4.5 is not fully supported by the IDE, regardless of whether it can be compiled or not by MSBuild, therefore it isn't supported in Ranorex Studio. I have found that multi-threaded and asynchronous logic (Note: not referring to STA/MTA) in 4.5 are not supported in Ranorex. I had to go back to 4.0, not because of auto-complete but because it didn't work.

Until 4.5 is fully supported I would hesitate to use 4.5 with Ranorex, but that is my opinion.
Shortcuts usually aren't...

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

Re: Problems with .NET 4.5

Post by Support Team » Wed Mar 11, 2015 10:14 pm

krstcs wrote:I have found that .NET 4.5 is not fully supported by the IDE, regardless of whether it can be compiled or not by MSBuild, therefore it isn't supported in Ranorex Studio
You are absolutely right, the IDE does not fully support .NET 4.5. You can target and compile code for .NET 4.5, but that's pretty much it.
krstcs wrote:I had to go back to 4.0, not because of auto-complete but because it didn't work.
Could you please clarify what did not work in particular apart from auto-complete?
I would like to add all required features for .NET 4.5 and C# 5.0 support to our internal data base. Thank you!

Regards,
Alex
Ranorex Team
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Problems with .NET 4.5

Post by krstcs » Thu Mar 12, 2015 2:47 pm

Alex,

I was using asynchronous programming to get data from a web service, and Ranorex would not compile when using await. I found a slightly different way to do it while still using 4.0, so it works now.

At this point I'm not to worried about it because my current code is working well.
Shortcuts usually aren't...

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

Re: Problems with .NET 4.5

Post by Support Team » Thu Mar 12, 2015 9:29 pm

krstcs wrote:...and Ranorex would not compile when using await.
OK, that's weird. Anyway, when we (finally) fully support .NET 4.5 also in the Ranorex Studio IDE, we will definitely make sure that the code also compiles :wink:

Regards,
Alex
Ranorex Team
.
Image

HoferDev
Posts: 1
Joined: Thu Jun 23, 2016 9:24 am

Re: Problems with .NET 4.5

Post by HoferDev » Thu Jun 23, 2016 9:32 am

Hi,

we have installed Ranorex 6.0.0 and .Net Framework 4.5.2.

In the Ranorex-usercode we want to use our referenced company-Framework, which is built with .Net Framework 4.5.2.

Is there any reason why Ranorex 6.0.0 obviously doesn't suppoert the .Net Framwork 4.5.2 - as can be seen in the ranorex-project-properties in the "Compiling"-tab under "Target Framework" - "Change target framework" ?

Do you guys know any workarounds to make Ranorex support .Net Framework 4.5.2?

Best regards,
Dominik

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

Re: Problems with .NET 4.5

Post by Support Team » Fri Jun 24, 2016 9:40 am

Hello Dominik,

This is a known issue in Ranorex 6.0 and there is already a feature request in our internal bug-tracking system. Currently, we do not know if and when this feature will be implemented. This depends on various factors. Nevertheless, all reported bugs and feature requests are documented in the release notes, with every new version release of Ranorex.

As a workaround you could modify the target framework version in the projects file (*.csproj) manually by using any text editor. Unfortunately, as a side effect you will get an exception when opening the Compiling tab in the project settings.

I hope this information will help you.

Sincerely,
Johannes
.
Image

hellboy81
Posts: 22
Joined: Sun Dec 10, 2017 8:52 pm

Re: Problems with .NET 4.5

Post by hellboy81 » Wed Feb 14, 2018 5:16 pm

Which Framework version is supported by Ranorex Studio 4.0?

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

Re: Problems with .NET 4.5

Post by odklizec » Thu Feb 15, 2018 8:56 am

Hi,

I believe the highest supported .Net version in Ranorex 4.x is 4.0 (the same SharpDevelop limitation as in 5.x). Anyway, Ranorex 4.x is long time dead horse ;) I can see no good reason to use such old version? You will not be able to use it with most recent web browsers or iOS/Android apps, Win10 is not supported in this version as well, so all in all, it may be good only for testing some old apps and technologies.
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

hellboy81
Posts: 22
Joined: Sun Dec 10, 2017 8:52 pm

Re: Problems with .NET 4.5

Post by hellboy81 » Thu Mar 08, 2018 2:34 pm

Sorry I mean the last version 8.0

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Problems with .NET 4.5

Post by qwertzu » Thu Mar 22, 2018 3:05 pm

hi,
Ranorex 8 supports up to .NET Framework 4.6.

regards, qwertzu