Linking a Repository

Best practices, code snippets for common functionality, examples, and guidelines.
HansSchl
Posts: 125
Joined: Wed Sep 19, 2018 10:05 am

Linking a Repository

Post by HansSchl » Thu Jul 16, 2020 2:29 pm

Dear all,

I am a bit confused about how to link an external repository into my test suite. I "Open from disk" the external repository, navigate to its folder and click "Open"; in the "Repository Project Reference Missing" dialog that follows, I click "Link" and "OK". However I keep ending up with a copy of the rxrep file in my working folder.
What makes things worse is that the "Repository Project Reference Missing" dialog isn't displayed in some situations. I assume this has to do with whether or not the external repository resides in a subdirectory of the current Ranorex project.
Can anyone expain to me the logic that is behind this? Why does linking create a copy, and why can't I link from a subdirectory? Maybe this is just a misconiguration on my side?
In case you might wonder why an external copy should be in a subdirectory: It is imported from its original location via subversion "svn:external".

Thank you
Hans

Vega

Re: Linking a Repository

Post by Vega » Wed Jul 22, 2020 2:19 pm

I linked a repository and I do not see a copy of the imported repository in the project folder where it was imported. The only thing I see in the project folder within Windows Explorer is a MyTest97Repository.cs (this is the repository I linked) but this is just a supporting cs file and not the repository. Repository files are made up of a few files but the main one is <name>.rxrep.

In the solution explorer I can see an icon next to the linked repository letting me know it is linked:
fahrumz.png
I edited the repository in the project it was imported to, and going back to the original project I can see the changes made affect both projects since the repo is linked. My steps to import the repo were as follows: Right click project --> Add existing --> browser to repo of choice --> Select Link

hope this helps!
You do not have the required permissions to view the files attached to this post.

HansSchl
Posts: 125
Joined: Wed Sep 19, 2018 10:05 am

Re: Linking a Repository

Post by HansSchl » Thu Jul 30, 2020 8:31 am

@Vega, did you try this when the linked repository is in a subdirectory of the directory containing the *.rxsln file?

ContiChris
Posts: 7
Joined: Tue Jun 01, 2021 8:56 am

Re: Linking a Repository

Post by ContiChris » Wed Jun 09, 2021 1:05 pm

I have the same behavior that the cs-file gets copied to the project where it is linked from. That would not be a problem for me. The problem is that I don't want to store this file in the svn repository again (because it is already stored at the original place). But without having this file in the svn repository twice , the build via msbuild fails because it does not copy the file automatically.
So, the build with Ranorex studio works because it always copies the file, whereas the build with msbuild fails without copying the file manually :(

HansSchl
Posts: 125
Joined: Wed Sep 19, 2018 10:05 am

Re: Linking a Repository

Post by HansSchl » Wed Jun 09, 2021 4:17 pm

@ContiChris, I finally gave up the struggle and let Ranorex do as it likes. I committed the copies into svn, and msbuild builds everything happily. After all, that is what I need :D