Rename project issues

Ask general questions here.
LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Rename project issues

Post by LPG » Thu Feb 14, 2013 1:32 am

I have renamed one of the projects in my main Solution from OLDNAME to NEWNAME (just picking random names, of course :) )

However, doing this didn't seem to change all filenames and folders accordingly.
* From within Ranorex, it shows the project name correctly as NEWNAME , and also the rxrep file as NEWNAME.rxrep.
* However, the folder structure for that project still shows OLDNAME (seen from Windows Explorer or SVN).
* When looking at the files in the project folder from Windows Explorer, I see the following files with the OLD project name:
-- rxrep (even though it shows as the new project from within Ranorex)
-- rxsln
-- sln
* In the /bin/Debug directory for the project folder, the exe file for the project shows the NEW project filename.

It doesn’t cause any build issues, and also no issues when running the scripts. But of course this messes up our scheduled runs, because it expects the project folder and exe files to contain the same project name.

How do I fix this without messing up the project?

Thank you!

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

Re: Rename project issues

Post by Support Team » Fri Feb 15, 2013 10:00 am

Hi,
LPG wrote:From within Ranorex, it shows the project name correctly as NEWNAME , and also the rxrep file as NEWNAME.rxrep.
Basically the name of the repository should not change by changing the projects name. Which version of Ranorex do you use?
LPG wrote:However, the folder structure for that project still shows OLDNAME
Yes, only the project name will be changed not the folder structure.
LPG wrote: When looking at the files in the project folder from Windows Explorer, I see the following files with the OLD project name:
-- rxrep (even though it shows as the new project from within Ranorex)
-- rxsln
-- sln
You have changed the name of the project, not the name of the solution.
LPG wrote:In the /bin/Debug directory for the project folder, the exe file for the project shows the NEW project filename.
... because you have changed the project name.
LPG wrote:It doesn’t cause any build issues, and also no issues when running the scripts. But of course this messes up our scheduled runs, because it expects the project folder and exe files to contain the same project name.

How do I fix this without messing up the project?
I would recommend to manually rename the folder structure as well as to manually edit the solution file (*.rxsln).

Regards,
Tobias
Ranorex Team
.
Image

TheAndyman
Posts: 2
Joined: Fri Mar 06, 2015 5:28 pm

Re: Rename project issues

Post by TheAndyman » Fri Mar 06, 2015 5:46 pm

I renamed the project and the solution and then manually edited the project folder and some files with in it and this is what I did to resolve my issues.

Renaming the solution or the project doesn’t automatically rename the project folder or files.
If you rename the files and folders manually you may get “The project file cannot be found"
Edit the .rxsln and locate the path statement to the .vbproj or the .csproj file. Edit or confirm the correct folder name is listed there.

Once the project opens there maybe one or more files with an (!) showing the old file names and “Unable to Open the file” The file does not exist”
Edit the .vbproj or .csproj file and find and replace the old filenames with the new file names. Save the file and close and reopen the solution/project.
Always good to make a copy of the file in case you make a mistake on editing the file reference and you want to start over.