Ranorex on WinForms and .NET6

Ask general questions here.
George
Posts: 1
Joined: Tue Feb 07, 2023 4:28 pm

Ranorex on WinForms and .NET6

Post by George » Tue Feb 07, 2023 4:44 pm

Hi all,

We are trying to migrate our WinForms application from .Net Framework 4.7.2 to .NET6 and we are seeing problems with our Ranorex UI tests. Particularly Ranorex fails to find the controls on the forms when running on NET6.

Has anyone tried to use Ranorex with WinForms on NET6?

Thanks.

foobar17
Posts: 1
Joined: Tue Mar 07, 2023 9:33 am

Re: Ranorex on WinForms and .NET6

Post by foobar17 » Wed Mar 08, 2023 10:49 am

We are facing issues as well.

To be precise:
The control was recognized as a WinForms .NEt 1.1 control. [..]
Attaching a debugger to the application under tests reveals, that ranorex tries to load Ranorex.Plugin.WinFormsProxy.Core.netcoreapp3.0.dll into the process. Which fails with an exception, because the file was not found.

Adding the file Ranorex.Plugin.WinFormsProxy.Core.netcoreapp3.0.dll as project reference in Ranorex (can be found in Ranorex install path) solves this issue.
With the assembly loader exception gone, the object recognition seems fixed. The error from above is gone.

Now we are still facing issues actually building the ranorex solution. Works well on my developer machine. Building on anything that did not collection studio version, sdks, runtime,... over several years yields warnings about unresolvable references. Still investigating.


I wonder if there is any guide on how to test .net 6 application with forms. I am just reverse engineering right now. Not really pleasant.

FinbarrRoche
Posts: 2
Joined: Tue Nov 08, 2022 9:05 am

Re: Ranorex on WinForms and .NET6

Post by FinbarrRoche » Fri Jul 28, 2023 6:33 am

Have you tried upgrading to Ranorex 10.7.1?

This has support for .NET6 and WinForms, this may solve your problem.