How to run the exe generated by ranorex on other PC

Best practices, code snippets for common functionality, examples, and guidelines.
rohitjain3333
Posts: 20
Joined: Tue Sep 20, 2011 7:12 am

How to run the exe generated by ranorex on other PC

Post by rohitjain3333 » Wed Jun 13, 2012 12:42 pm

How to run the exe generated by ranorex on other pc not having ranorex.
Do we need any dlls to be copied from pc to the other pc?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to run the exe generated by ranorex on other PC

Post by Support Team » Wed Jun 13, 2012 12:58 pm

Hi,

basically you need a valid license (at least a runtime license) as well as an installation of the core components of Ranorex or a copy of the complete Ranorex "bin" folder (from the Ranorex installation, including all subfolders) on the machine you want to run the Ranorex tests on.

Regards,
Tobias
Ranorex Team

Irene
Posts: 1
Joined: Mon Mar 18, 2013 10:38 am

Re: How to run the exe generated by ranorex on other PC

Post by Irene » Mon Mar 18, 2013 10:44 am

Hi!

I tried to copy contents of the "bin" folder (created Ranorex 4.0 folder in Program Files) to another machine and open .exe with tests in NUnit but got this error:
System.Io.FileNotFoundException: Unable to load file or assembly "Ranorex.Core, Version=4.0.2.21666, Culture=neutral, PublicKeyToken=..." or one of its dependencies. File not found.

Am I doing something wrong?

UPD: managed to get it working by copying my .exe and all contents of "bin" folder to \\NUnit 2.6.2\bin\framework directory. So never mind :) (If this is incorrect, please tell though.)

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to run the exe generated by ranorex on other PC

Post by Support Team » Tue Mar 19, 2013 4:52 pm

Hello,

It should be enough to copy the Ranorex.Core.dll into the bin folder of NUnit.

Regards,
Markus (T)

tgagel
Posts: 33
Joined: Tue Jun 04, 2013 7:50 pm

Re: How to run the exe generated by ranorex on other PC

Post by tgagel » Tue Aug 13, 2013 2:22 am

I am getting a similar error (see below) and can't figure out how to get the exe to run on a 2nd machine.

Code: Select all

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Ranorex.Core, Version=4.0.5.24508, Culture=neutral, PublicKeyToken=b798506b574ebc9a' or one of its dependencies. The system cannot find the file specified.
   at EnCompass.Program.Main(String[] args)
I have Ranorex installed on the 2nd machine (Windows Server 2008 R2) and it has a node-locked runtime license. I've copied the EXE and the RXTST into the same folder on the 2nd machine and the test uses no special dll's (it does have a data binding to an excel file though). Is there something else I'm missing?

Thanks.

Todd

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to run the exe generated by ranorex on other PC

Post by Support Team » Tue Aug 13, 2013 9:15 am

tgagel wrote:I am getting a similar error (see below) and can't figure out how to get the exe to run on a 2nd machine.
Do you have the same Ranorex version installed on both machines?
Looks like you compiled your executable with version 4.0.5, but the other machine has an older version installed and since cannot load the required Ranorex DLLs.

Regards,
Alex
Ranorex Team

tgagel
Posts: 33
Joined: Tue Jun 04, 2013 7:50 pm

Re: How to run the exe generated by ranorex on other PC

Post by tgagel » Tue Aug 13, 2013 6:53 pm

Thanks for the reply.

I confirmed I have the same versions of Ranorex on both machines (even uninstalled it from the 2nd machine and just copied the full bin directory to it instead) so that shouldn't be the issue. I think I may have something though. The 2nd machine where the test won't run is also running Ranorex License Server and I see the version of the Ranorex.Core.Dll in the License Server's install directory is 4.0.4.23593 (while the install version is 4.0.5.24508). Is there a newer version of the Rational License Server install? (I used the link from our license email which was sent on June 19 - so perhaps a newer one has been released since then and I need that install?)

Thanks.

Todd

tgagel
Posts: 33
Joined: Tue Jun 04, 2013 7:50 pm

Re: How to run the exe generated by ranorex on other PC

Post by tgagel » Thu Aug 15, 2013 7:28 pm

I tried copying the newer dll's into the Ranorex License Server's bin folder but that broke Rational License Server (and it still didn't fix running the tests). Any help, things to try, etc?

Thanks,

Todd

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

Re: How to run the exe generated by ranorex on other PC

Post by krstcs » Fri Aug 16, 2013 3:21 pm

First, how did copying RANOREX dlls break RATIONAL's license server?

Second, you should update the RANOREX License Server using the download link on the RANOREX download page (link on the Ranores Studio Start Page), not by copying over the existing dlls. You should never copy new dlls over old ones in Windows for an installed product as this messes up the registry, and you don't know what references are linked in the files you DIDN'T copy over.

Third, you STILL have to have an available license for any of this to work.
Shortcuts usually aren't...

tgagel
Posts: 33
Joined: Tue Jun 04, 2013 7:50 pm

Re: How to run the exe generated by ranorex on other PC

Post by tgagel » Fri Aug 16, 2013 3:43 pm

First, how did copying RANOREX dlls break RATIONAL's license server?
It would no longer run but I saved the old dll's and got it working again.
Second, you should update the RANOREX License Server using the download link on the RANOREX download page (link on the Ranores Studio Start Page), not by copying over the existing dlls. You should never copy new dlls over old ones in Windows for an installed product as this messes up the registry, and you don't know what references are linked in the files you DIDN'T copy over.
Thanks. I didn't notice the links on the Ranorex Studio Start Page.
Third, you STILL have to have an available license for any of this to work.
Yep, the licenses are good. I can open Ranorex Testsuite Runner with no licensing error/warning. The tests just error when I try and execute.

I actually just sent a note to Ranorex support with the latest info...

-------------

It doesn’t seem to be related to Ranorex License Server as I’m getting the same error on another machine as well.

• My machine (where the tests were created) is Windows 7 (64 bit) and has a node-locked Premium license.
• Our server is Windows Server 2008 R2 (64 bit), it has a node-locked runtime license and is running Ranorex License Server (which hosts a floating runtime license.
• Another runtime machine is Windows 7 (32 bit) and points to the License Server for its’ runtime license.

All machines have Ranorex 4.0.5 installed and I’ve copied the complete ‘debug’ directory from my machine to the runtime machines. I can run the tests from my machine via Ranorex Testsuite Runner and by launching the exe with no problems. On the other two machines I get the error below (whether using via Ranorex Testsuite Runner or launching the exe):

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Ranorex.Core, Version=4.0.5.24508, Culture=neutral, PublicKeyToken=b798506b574ebc9a' or one of its dependencies. The system cannot find the file specified.
at EnCompass.Program.Main(String[] args)

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to run the exe generated by ranorex on other PC

Post by Support Team » Fri Aug 16, 2013 5:43 pm

Hi,

May I ask you to uninstall and reinstall Ranorex on the machines where you get the errors?
Please use the setup.exe for the re-installation.

Thanks,
Markus

tgagel
Posts: 33
Joined: Tue Jun 04, 2013 7:50 pm

Re: How to run the exe generated by ranorex on other PC

Post by tgagel » Fri Aug 16, 2013 7:33 pm

:oops: I must have used on old link in the email to grab the install files. My pc's Ranorex version and the versions on the test machines were different. Thanks and sorry.

Todd

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to run the exe generated by ranorex on other PC

Post by Support Team » Sat Aug 17, 2013 3:41 pm

tgagel wrote::oops: I must have used on old link in the email to grab the install files. My pc's Ranorex version and the versions on the test machines were different. Thanks and sorry.
Glad you found the problem. Thank you for reporting back!

Regards,
Alex
Ranorex Team

sjberkeley
Posts: 4
Joined: Fri Mar 21, 2014 7:05 pm

Re: How to run the exe generated by ranorex on other PC

Post by sjberkeley » Thu Sep 04, 2014 2:53 pm

Running my exes on other machines by copying the DLLs from the bin directory is working fine for me. The first time I do this on a machine, I get a dialog requesting me to register my license server. Is there a way to automate this so that I can distribute tests without doing any manual setup on the other machines ? For example, is there an environment variable I can set to point to my license server ? Thanks ...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to run the exe generated by ranorex on other PC

Post by Support Team » Tue Sep 09, 2014 9:20 am

Hello sjberkeley,

May I ask you to send an email to [email protected]? We are not exactly sure what issue you are facing and since we may need access to confidential data we would like to treat this request via email.

Thanks,
Robert