Page 1 of 1

Changing Name of Object in Repo Does not Update Recording.cs

Posted: Tue Apr 13, 2010 7:26 am
by costamesakid
This may have all ready been written up but I noticed if you rename a repository object the corresponding object in that .cs file is not updated. You need to also rename it in the .cs file which actually isnt suppose to be allowed by Ranorex.

It seems to me that when you Build the new repository object name is not being used by the corresponding .cs file. Thanks

Re: Changing Name of Object in Repo Does not Update Recording.cs

Posted: Tue Apr 13, 2010 1:44 pm
by Support Team
Hi!

If you change the name of an item or folder in a repository ("MyRepository.rxrep"), the corresponding code file ("MyRepository.cs") will be updated when the repository is saved, e.g. when saving the project or building the project.

References to the the repository item in other files will not be updated; e.g. if you use the repository item in your "Program.cs" file, the repository item name is not updated in those files.

Regards,
Peter
Ranorex Support Team

Re: Changing Name of Object in Repo Does not Update Recording.cs

Posted: Tue Apr 13, 2010 5:01 pm
by costamesakid
Thanks Peter.

I am actually referring to the .cs files associated with a Recording. For instance Recording1.cs. If Recording1.cs references a repository item, and I change the name of that item I would expect the item named to be updated in Recording1.cs after I do a build but it does not. I have to manually change the names in Recording1.cs which caused me some confusion as I thought these files were not editable. In fact they have the disclaimer at the top, "...DO NOT MODIFY THIS FILE!", but I have to as its the only way I can get my solution to build after I change the name of a repo item. Thanks

Re: Changing Name of Object in Repo Does not Update Recording.cs

Posted: Wed Apr 14, 2010 1:15 pm
by Support Team
Hi!

I'Ve changed a repoistory item which is used in my recording. After saving the repository, all items in Recording.cs updated, even when I don't save the Repository and build the whole project instantly.
I've tired this with Ranorex Version 2.2 and 2.3.

Which version of Ranorex you use?

Regards,
Peter
Ranorex Support Team