How can you rename the project mpr file for a git controlled project

0
You can only find apps by there .mpr filename if you open them in Studio Pro, so most of our apps start as App and we rename it to the name that is decided later in the project.   But the .mpr file is not renamed, if you change the name of the project in General Settings. There are som forum issues how to handle SVN controlled projects, but how can you change a Git controlled project?
asked
2 answers
2

Just found the solution:

 

Copy the old.mpr file to a new .mpr file

Commit change

Remove old.mpr file

Commit change

answered
1

Hi, Just wanted to share the process which worked for us recently: (using tortoise git approach)

  1. Open the project in Studio Pro. Don't run it.
    1. If already running, then stop it and clean the deployment directory.
  2. Rename the  <old_appname>.mpr file using git rename mechanism to <new_appname>.mpr,Git option for file rename.png
  3. Then do a commit taking help of tortoise git approach. (before this commit don't open the project in Studio Pro).
    1. You will be asked for username and password to perform above action.
    2. Username : your email id used for accessing the project.
    3. Password : A token generated from Mendix profile page.
      1. Go to mendix sprintr portal > Your Profile > User Settings > Developer Settings > Generate a New Token.
      2. Make sure to select below scopes,image.png
      3. Copy and store the token in a notepad since this is viewable only once.
  4. After commit is done, open the .gitignore file and you would see automatically two lines added for .mpr.bak and .mpr.lock with the new project name.image.png
  5. So clean the other two entries for .mpr.bak and .mpr.lock with old app name. Don't remove the new ones.
  6. Open the project in Studio Pro and make commit from there so that the .gitignore file changes are also pushed to server.
  7. I have below version of Tortoise git installed on my machine.image.png

Thanks for a read out!

 

 

answered