Page 1 of 1

Referencing Repository within User Code

Posted: Wed Jan 11, 2017 3:50 pm
by rhx
I would like to reference my Repo within a UserCodeCollection like this:

Code: Select all

var repo = GuiRepository.Instance;

The repo "GuiRepository" is located in a Project "Repo", the UserCodeCollection in Project "Code". Within "Code" there is a link to "GuiRepository" in "Repo". I understand I don't need an additional "Reference" for this because the link?

Compiling the solution I get "The name 'GuiRepository' does not exist in the current context (CS0103)"

What's wrong with my approach?

Thanks, Rainer

Re: Referencing Repository within User Code

Posted: Thu Jan 12, 2017 2:54 pm
by odklizec
Hi,

Correct referencing of Ranorex repository in code modules should look like this:

Code: Select all

private static SolutionName.SolutionNameRepository repo = SolutionName.SolutionNameRepository.Instance;