Page 1 of 1

User code collection - Namespace name could not be found

Posted: Wed Jul 18, 2018 8:58 am
by alexlosk
Hi all,

I am trying to include an user code collection in my 'Ranorex Automation Helper' section.
usc1.png
But when I create my UserCodeMethod I am not able to access to the repository of my solution and ranorex gives me this error:

The type or namespace name 'AutomationFinance' could not be found (are you missing a using directive or an assembly reference?) (CS0246)

I've tried to include right after my 'Public class Section Validations' to define the repo (highlighted in red in the screenshot) but it does not work.
Could any of you help me to fix this issue?
usc3.png

Re: User code collection - Namespace name could not be found

Posted: Thu Jul 19, 2018 1:36 pm
by dpFourOFour
Hi alexlosk,

To access the repository within your usercode collection, you need to reference the project that contains the repository.
You can do this by selecting 'add reference' from the context menu (right click the 'References' entry in your automationhelper project).
In the upcoming dialog, you need to select the 'projects' tab and your project that contains the repository.
Next step is to add the 'using' directive to your automationhelper project.
using AutomationFinance;
Now you should be able to access the repo.

Hope that helps,

DP

Re: User code collection - Namespace name could not be found

Posted: Thu Jul 19, 2018 2:15 pm
by alexlosk
It works!!!! :D :D thanks so much !