Ranorex System.TypeInitializationException

Ask general questions here.
Posts: 1
Joined: Fri Nov 27, 2015 4:39 pm

Ranorex System.TypeInitializationException

Post by juste3alfaza » Fri Nov 27, 2015 4:55 pm

I see this tut to integrate Ranorex under VS, Visual Studio Integration on ur site
After I use my code when Ranorex is installed is works fine, but after uninstalled it, I have a library of Ranorex payed version, but I don't install it on my PC, just I need the library. there an exception showed with this line of code
Form form = Host.Local.FindSingle<Ranorex.Form>("form[@processname='" + pr.ProcessName + "']");

On debug Mode shows ;
'Host.Local' threw an exception of type 'System.TypeInitializationException'

Exception :
Exception thrown: 'System.TypeInitializationException' in Ranorex.Core.dll Additional information: The type initializer for 'Ranorex.Core.ElementEngine' threw an exception.

Is that possible for using the library I most have ranorex installed or not?

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

Re: Ranorex System.TypeInitializationException

Post by krstcs » Mon Nov 30, 2015 10:46 pm

It is not required to install Ranorex, but it is :!: HIGHLY RECOMMENDED :!: .

If you search these forums you will see several threads about how to use Ranorex without a complete install.

HOWEVER, as I said above, you SHOULD install Ranorex from the Ranorex-X.X.X.exe (where 'X.X.X' is the CURRENT version number).

There is nothing lost by installing the full system and this will ensure that all libraries and executables are placed in the correct location and registered with the system.

NOTE: You will still need a VALID license in order to use Ranorex on ANY system.
Shortcuts usually aren't...