Program.cs template

Ranorex Spy, Recorder, and Studio.
Brett
Posts: 12
Joined: Thu May 27, 2010 9:00 pm

Program.cs template

Post by Brett » Thu Aug 19, 2010 10:52 pm

Is there a file that Ranorex uses to generate the program.cs that I can edit to get a different Program.cs file? I would like to add some fields to the default. Thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Program.cs template

Post by Support Team » Thu Aug 19, 2010 11:14 pm

Yes, there are such templates for the Program.cs file generated when you create a new project in Ranorex Studio. For every project type there is a *.xpt template file in the "RanorexStudio" directory of your Ranorex installation that contains all the information to create a new project, including the template for the Program.cs file.

The project template for the "Ranorex C# Test Automation" project is in the following location (for Ranorex V2.3):
%ProgramFiles%\Ranorex 2.3\RanorexStudio\AddIns\AddIns\DisplayBindings\RxRecorder\Templates\Projects\CSharp\RanorexTestAutomation.xpt

To customize the Program.cs file for newly created projects of that type, just open and edit the file using a text editor. The template file contains XML data and it should be easy to find the section where the Program.cs code is located :)

Regards,
Alex
Ranorex Team
.
Image

Brett
Posts: 12
Joined: Thu May 27, 2010 9:00 pm

Re: Program.cs template

Post by Brett » Fri Aug 20, 2010 7:21 pm

Found it, thanks!