Ranorex and ClickOnce

Ask general questions here.
Captain Nemo
Posts: 17
Joined: Tue Dec 02, 2008 10:09 am

Ranorex and ClickOnce

Post by Captain Nemo » Mon Jun 01, 2009 2:07 pm

I am testing an application, using InvokeRemotely to transfer data out of .net controls. I'm referencing pre-compiled assemblies in order to use the controls.

However, when I try and use InvokeRemotely, I get:

Cannot load assemblies dynamically - application is not deployed using ClickOnce.

Anyone else encountered this?

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

Post by Support Team » Wed Jun 03, 2009 8:36 am

Ranorex needs to dynamically load the assemblies containing the remotely invoked delegate in the remote process when using the InvokeRemotely method; it therefore subscribes to the AppDomain.AssemblyResolve of the current appdomain. I assume that your application subscribes to the AppDomain.AssemblyResolve domain as well and throws that exception in its event handler when the assembly to resolve is not one of its own (like in this MSDN sample).
The problem now is that the event handlers subscribing to the AssemblyResolve event should not throw an exception, but return null in case they cannot resolve the assembly, so that other event handlers that were subscribed later can also try to resolve the assembly. If this is an application you can alter, please correct the subscribed event handlers so that they do not throw an exception!

Ranorex Support Team