Page 1 of 1

Running script in VisualStudio 2017 getting error

Posted: Fri Jan 10, 2020 10:38 pm
by Aracknid
Using Ranorex 9.2.1. on Windows 10.

I've opened a program I wrote in Visual Studio 2017 and it throws an exception on the first line of Ranorex usage (where you'd get the trial dialog if you didn't have a license, and yes I have a valid license).

The error is: System.ComponentModel.Win32Exception: 'Access is denied'

I've researched this a bit on the web, and most of the examples I've found to resolve this problem don't apply to me. I am running Visual Studio with Administration privileges. I'm not doing anything with web or IIS, nor running on a server. I'm not trying to access a file.

The first Ranorex code I execute (aside from InitResolver(), RanorexInit() ) is to look for a DOM, e.g.:
Dim foo As Ranorex.WebDocument = Nothing
foo = Host.Current.FindSingle("./dom") 'This throws the exception

I'm know this was working with an older version of Ranorex (version 8.x). I updated to 9.1 at one point and also since this is a development system for other types of coding, I've done other coding (not related to Ranorex). I've installed .NET development 4.6.2. It was not working with Ranorex 9.1 so I updated to 9.2.1 and it still doesn't work.

Any thoughts?

Thanks,

Aracknid

Re: Running script in VisualStudio 2017 getting error

Posted: Mon Jan 13, 2020 11:18 pm
by Vega
Very strange for sure; are you able to post the full exception by chance? Does this specifically happen on the line #1 or #2 within the code sample you provided?

Also you mentioned this occurs in an existing project, what happens when you create a brand new project following the VS integration? Would you be able to share a very minimalist sample project which reproduces the issue for you?

https://www.ranorex.com/help/latest/int ... tegration/