| View previous topic :: View next topic |
| Author |
Message |
kimhauge
Joined: 02 Jun 2008 Posts: 2
|
Posted: Tue Jun 03, 2008 9:55 am Post subject: RanorexCore.dll and DllNotFoundException |
|
Hi. I have downloaded Ranorex evaluation version 1.4.0. I opened up the RanorexVS2005Sample2 project, compiled it and tried to run it in debug mode. I then got an DllNotFoundException:
Code: click into code to enlarge
System.DllNotFoundException was unhandled
Message="Unable to load DLL 'RanorexCore.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
Source="RanorexNet"
TypeName=""
StackTrace:
at Ranorex.NativeMethods.RxSetSleepTime(Int32 sleeptime)
at Ranorex.Application.set_SleepTime(Int32 value)
at RanorexVS2005Sample2.Class1.Main(String[] args) in C:\Program Files\Ranorex 1.4\Samples\RanorexVS2005Sample2\Class1.cs:line 47
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Please also note that I get the very same type of exception when trying to insert code generated from the Ranorex Recorder into one of my Nunit tests....
But instead of getting it from:
Application.SleepTime = sleeptime;
I now get it from:
form = Application.FindFormClassName("OPOS");
Also note that I have tried to reference both the version from:
Net2.0-Pro-Debug\RanorexNet.dll
and
Net2.0-Pro\RanorexNet.dll
I do get the sample project specified to run if I run it in release mode, but I really can't use Ranorex if it doesn't allow me to run code in debug mode...
Is there a simple solution to this problem?
Best regards,
Kim |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 435
|
Posted: Tue Jun 03, 2008 4:57 pm Post subject: |
|
As stated in the exception, the RanorexCore.dll is needed to execute Ranorex methods. That's why the RanorexCore.dll needs to be in the same directory as the application that calls Ranorex methods.
By default, the Release configuration of the Ranorex RanorexVS2005Sample2 builds the resulting exe to the Ranorex\bin\Net2.0 folder, whereas the Debug configuration builds to the Ranorex\bin\Net2.0-Debug folder. Please, change the "Output path" property in the Build properties page of the RanorexVS2005Sample2 project to point to the Ranorex\bin\Net2.0 folder.
When using NUnit, just put the RanorexCore.dll, RanorexNet.dll and RanorexSpy.dll into the folder where your NUnit test library is. You might also read this thread concerning NUnit and and Ranorex.
Regards,
Alex
Ranorex Support Team |
|
| Back to top |
|
 |
kimhauge
Joined: 02 Jun 2008 Posts: 2
|
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 435
|
|
| Back to top |
|
 |
|