Jenkins needs *Repository.cs files. Why?

Ranorex Spy, Recorder, and Studio.
Posts: 35
Joined: Wed Mar 13, 2019 9:02 am

Jenkins needs *Repository.cs files. Why?

Post by boegvald » Wed Jul 10, 2019 12:55 pm

We are versioning our Ranorex solutions in GitLab. In order to avoid peronal preferences to be shared among testers, I inserted a .gitignore file in the GitLab project to filter out preference files (see file below). The .gitignore file (I found elsewhere in this forum) also excluded other file types, of which most are already excluded by Ranorex.

That worked fine... for regular users. But not for building Ranorex solutions via the Jenkins plugin.

I had to remove *.sln files from .gitignore as Jenkins use that file for building. Then things worked fine... until someone created a new project... Seems like the Jenkins plugin needs *Repository.cs files in order to build. After removing that one from the .gitignore file, Jenkins builds were fine again.

Anyone knows why? Are solutions built differently by the Jenkins plugin and the Ranorex GUI?

Code: Select all

# Taken from
# CHANGE: removed *.sln from list - Jenkins needs it.
#User specific files
Solution specific files
#Project specific files
#Autogenerated files
# CHANGE: *Repository.cs removed. Jenkins needs it. 
#Reports Directory
#Output Directories
#Repository Images
#Nuget Packages
Best Regards

Bo Bøgvald
Best Regards


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

Re: Jenkins needs *Repository.cs files. Why?

Post by odklizec » Wed Jul 10, 2019 1:10 pm


Repository.cs file is generated by Ranorex Studio and not by MS Build, which actually builds the test from source files. Therefore, it must be included in source control. The same apply for Recording.cs files and other auto-generated cs files.
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

Posts: 35
Joined: Wed Mar 13, 2019 9:02 am

Re: Jenkins needs *Repository.cs files. Why?

Post by boegvald » Thu Jul 11, 2019 10:51 am

Thank much , Pavel. Sometimes a few words makes a big difference in one's perception! It now makes great sense to me why the .ignore file was made as it was, and why I needed to make changes to it in order to allow for builds via Jenkins. Best Regards, Bo
Best Regards