References are not working properly with structured project/solution setup

Ask general questions here.
ContiChris
Posts: 7
Joined: Tue Jun 01, 2021 8:56 am

References are not working properly with structured project/solution setup

Post by ContiChris » Thu Jun 17, 2021 9:48 am

I setup the following (folder) structure for our project (a WinForms application):
  • common
    • automation_helpers
      • a project with just code modules like "copyFiles", "deleteFiles"....
    • rx_repos
      • a solution with all the repository items of our AUT
    • rx_modules
      • a solution with different module projects
      • it keeps the recording steps, like "startApp", "closeApp", "clickHereAndThere"...
      • each project references the repositories as link
      • the solution also includes the project "automation_helpers" added as "add existing project"
      • some of the projects have a reference to the project "automation_helpers" set (via AddReference/Project, not to the dll)
  • tests
    • this folder keeps solutions with the testsuites
    • the solutions add the rx_modules projects "as existing projects"
Building the modules solution in rx_modules is no problem. The problem is to build the solutions in the tests-folder. As soon I use a recording module there that itself uses code from the automation_helpers the build fails. It is not able to find the user code:

Code: Select all

Error - Action #1: Method "  AutomationHelpers.UserCodeCollections.FileLibrary.DeleteFiles(System.String path, System.String pattern) " does not exist. Select a different method or add it to the user code. - C:\rx_modules\example\src\modules\CleanupCustomerDB.rxrec:1
Does anyone have an idea how I have to handle or publish/distribute the automation_helpers project or dll so that the build can find it? I already tried to copy it on different location but without success.
Btw, I am using Ranorex 9.5.0

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: References are not working properly with structured project/solution setup

Post by odklizec » Fri Jun 18, 2021 11:17 am

Problem already discussed (and solved) here:
https://www.ranorex.info/viewtopic.php? ... 885#p66873
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration