We can debug scripts compiled as x86, but an error is reported as soon as the debugger is launched once the script is modified to compile as 'Any processor':
We tried installing .NET 4.0 (extended client profile) and adding app.config files as indicated in another thread and in the user guide (general troubleshooting - http://www.ranorex.com/support/user-gui ... oting.html):Debugger error:
HR = 0x80131C30
Code = 0x0
Debugging 64-bit processes is currently not supported.
If you are running a 64-bit system, this setting might help:
Project -> project Options -> Compiling -> Target CPU = 32-bit Intel
Code: Select all
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> <supportedRuntime version="v2.0.50727"/> </startup> </configuration>
The problem only seems to affect debugging; the scripts execute fine in Ranorex Studio when executed with ‘Run without debugging’ or executed directly or by batch file outside of Ranorex Studio.Can not start process. The request is not supported. (Exception from HRESULT: 0x80070032)
Our AUT is a client-server application that is compiled as 'AnyCPU'. The client application is used on XP SP3 (x32) and Win7 SP1 (x32) systems. The same executables are used on Windows Server 2008 Datacenter (x64) to support web services. Our backend server is Windows Server 2008 (x64) with an Oracle 11gR2 (v184.108.40.206.0) database.
The AUT can also be configured for stand-alone operations, where the client software and database are both installed on a end-user system. While end-user and client systems are currently XP SP3 (x32) and/or Win 7 (x32), plans do exist to allow Win 7 x64 clients and stand-alones in the near future.
Our tests interact with the database to do lookup queries and the like. Our test development systems are configured as clients to a common database server. The database access is managed by an installed Oracle Data Access Client (ODAC). The x64 ODAC is installed on x64 systems and the x32 ODAC is installed on x32 systems.
The AUT won't work with the wrong ODAC installed (i.e., x32 on a x64 system) and the test scripts accessing the database receive Oracle Type Mismatch errors when compiled as x86 on x64 systems with the x64 ODAC. Thus our scripts must be compiled as "AnyCPU" to properly interact with the ODAC version installed on any system running the tests and the AUT.
We tried converting to the scripts to use .NET 3.5, but with no change in results.
We tried upgrading Ranorex to 3.0.5 and then 3.1.0, but again with no change in results.
Are there configuration setting we need to set in our test library, are there settings in Ranorex Studio that should be set, or are we unable to use Ranorex Studio to debug scripts on x64 systems when compiled as "AnyCPU"?
A work-around allows debugging the scripts using VS2008, but only when the scripts' app.config file is modified so that the "<supportedRuntime version="v4.0"/>" line is removed or commented out:
Code: Select all
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <!-- <supportedRuntime version="v4.0"/> --> <supportedRuntime version="v2.0.50727"/> </startup> </configuration>
We have managed to reproduce the issue by creating a script that executes operations on the Windows Calculator. The results match what we're seeing in our AUT scripts, even though no database access occurs.
The attached ZIP file contains four versions of the TestCalc2 script:
This is the original script folders and files that launches calculator, runs some calculations, then exits. Built as .NET 2.0 and x86, this version can be debugged within Ranorex Studio.
TestCalc2 - .NET 3.5
‘TestCalc2’ modified to use .NET 3.5, but still compiled as x86 – this version can still be debugged within Ranorex Studio.
TestCalc2 – AnyCPU
‘TestCalc2’ modified to compile as AnyCPU, but still target for .NET 2.0 – this version cannot be debugged in Ranorex Studio – nor in VS2008.
TestCalc2 - AnyCPU -VS2008
‘TestCalc2 – AnyCPU’ with the app.config file modified to allow debugging in VS2008 (but not Ranorex Studio).
A snapshot of the Calculator application has also been attached.