Skip to content

Instantly share code, notes, and snippets.

@philippedurocher
Forked from n3dst4/renaming.markdown
Created May 23, 2021 04:46
Show Gist options
  • Select an option

  • Save philippedurocher/e8033a1b9f3d963ec68a55ea5c9aa542 to your computer and use it in GitHub Desktop.

Select an option

Save philippedurocher/e8033a1b9f3d963ec68a55ea5c9aa542 to your computer and use it in GitHub Desktop.

Revisions

  1. @n3dst4 n3dst4 revised this gist Sep 4, 2020. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions renaming.markdown
    Original file line number Diff line number Diff line change
    @@ -23,8 +23,9 @@

    # Update 2020-09-04

    @ModernRonin has written an automated tool for doing this - give it a go before trying the manual steps here, and let us know how it goes!
    ModernRonin has written an automated tool for doing this - give it a go before trying the manual steps here, and let us know how it goes!

    https://github.com/ModernRonin/ProjectRenamer

    https://github.com/ModernRonin/ProjectRenamer
    https://www.nuget.org/packages/ModernRonin.ProjectRenamer/

  2. @n3dst4 n3dst4 revised this gist Sep 4, 2020. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions renaming.markdown
    Original file line number Diff line number Diff line change
    @@ -20,3 +20,11 @@
    9. Don't forget to update any corresponding servcies and integrations, such as:
    * Github repositories
    * Continuous Integration configs

    # Update 2020-09-04

    @ModernRonin has written an automated tool for doing this - give it a go before trying the manual steps here, and let us know how it goes!

    https://github.com/ModernRonin/ProjectRenamer
    https://www.nuget.org/packages/ModernRonin.ProjectRenamer/

  3. @n3dst4 n3dst4 revised this gist Oct 18, 2019. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions renaming.markdown
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    1. Close Visual Studio and don't open it again until I tell you. Visual Studio is not competent at renaming things.
    2. Assuming you're using git, clean the working folder to remove anything that's not in version control (this will help the search-and-replace step because it won't have to go through a bunch of generated files)

    `git clean -fdx`
    `git clean -fdx`

    2. Rename the **solution file** (`.sln`), the project **folders**, and the **project files** (`.csproj`, `.fsproj`)
    3. Open the project folder in any good text editor.
    @@ -18,5 +18,5 @@
    8. See if it builds.
    9. Commit and push everything.
    9. Don't forget to update any corresponding servcies and integrations, such as:
    * Github repositories
    * Continuous Integration configs
    * Github repositories
    * Continuous Integration configs
  4. @n3dst4 n3dst4 revised this gist Dec 7, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion renaming.markdown
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@

    `git clean -fdx`

    2. Rename the solution file (`.sln`), the project folders, and the project files (`.csproj`, `.fsproj`)
    2. Rename the **solution file** (`.sln`), the project **folders**, and the **project files** (`.csproj`, `.fsproj`)
    3. Open the project folder in any good text editor.
    4. Search-and-replace across the whole folder and replace and text occurrences of the old name with the new name. Sublime Text and Atom have a tree view where you can right click -> Search in folder. Notepad++ has a "Find in files" option.
    5. Hunt around for any weirdly mis-spelt versions of the old name that may not have been caught by the search-and-replace.
  5. @n3dst4 n3dst4 revised this gist Dec 7, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions renaming.markdown
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,9 @@

    1. Close Visual Studio and don't open it again until I tell you. Visual Studio is not competent at renaming things.
    2. Assuming you're using git, clean the working folder to remove anything that's not in version control (this will help the search-and-replace step because it won't have to go through a bunch of generated files)

    `git clean -fdx`

    2. Rename the solution file (`.sln`), the project folders, and the project files (`.csproj`, `.fsproj`)
    3. Open the project folder in any good text editor.
    4. Search-and-replace across the whole folder and replace and text occurrences of the old name with the new name. Sublime Text and Atom have a tree view where you can right click -> Search in folder. Notepad++ has a "Find in files" option.
  6. @n3dst4 n3dst4 revised this gist Dec 7, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions renaming.markdown
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,10 @@
    # How to rename solutions and projects that were created in Visual Studio

    1. Close Visual Studio and don't open it again until I tell you. Visual Studio is not competent at renaming things.
    2. Open the project folder in any good text editor.
    3. Rename the solution file (`.sln`), the project folders, and the project files (`.csproj`, `.fsproj`)
    2. Assuming you're using git, clean the working folder to remove anything that's not in version control (this will help the search-and-replace step because it won't have to go through a bunch of generated files)
    `git clean -fdx`
    2. Rename the solution file (`.sln`), the project folders, and the project files (`.csproj`, `.fsproj`)
    3. Open the project folder in any good text editor.
    4. Search-and-replace across the whole folder and replace and text occurrences of the old name with the new name. Sublime Text and Atom have a tree view where you can right click -> Search in folder. Notepad++ has a "Find in files" option.
    5. Hunt around for any weirdly mis-spelt versions of the old name that may not have been caught by the search-and-replace.
    6. Specifically, look for a **package.nuspec** (Nuget package manifest) and check the package name in there. It should probably be the same as the solution.
  7. @n3dst4 n3dst4 revised this gist Dec 7, 2015. No changes.
  8. @n3dst4 n3dst4 revised this gist Dec 4, 2015. No changes.
  9. @n3dst4 n3dst4 revised this gist Dec 4, 2015. 1 changed file with 8 additions and 6 deletions.
    14 changes: 8 additions & 6 deletions renaming.markdown
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,11 @@
    2. Open the project folder in any good text editor.
    3. Rename the solution file (`.sln`), the project folders, and the project files (`.csproj`, `.fsproj`)
    4. Search-and-replace across the whole folder and replace and text occurrences of the old name with the new name. Sublime Text and Atom have a tree view where you can right click -> Search in folder. Notepad++ has a "Find in files" option.
    5. Now open VS again and see if the project loads.
    6. Hunt around for any weirdly mis-spelt versions of the old name that may not have been caught by the search-and-replace.
    7. Specifically, check the **package.nuspec** for the package name. It should be the same as the solution.
    8. Now commit and push everything to Integration.
    9. Go to GitHub and rename the repository, if need be. You may need to get an adult with admin privileges to help you with this.
    10. Go to TeamCity.
    5. Hunt around for any weirdly mis-spelt versions of the old name that may not have been caught by the search-and-replace.
    6. Specifically, look for a **package.nuspec** (Nuget package manifest) and check the package name in there. It should probably be the same as the solution.
    7. (Finally) Open VS again and see if the project loads.
    8. See if it builds.
    9. Commit and push everything.
    9. Don't forget to update any corresponding servcies and integrations, such as:
    * Github repositories
    * Continuous Integration configs
  10. @n3dst4 n3dst4 revised this gist Dec 4, 2015. No changes.
  11. @n3dst4 n3dst4 created this gist Dec 4, 2015.
    16 changes: 16 additions & 0 deletions renaming.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    # How to rename solutions and projects in Visual Studio

    1. Don't.

    # How to rename solutions and projects that were created in Visual Studio

    1. Close Visual Studio and don't open it again until I tell you. Visual Studio is not competent at renaming things.
    2. Open the project folder in any good text editor.
    3. Rename the solution file (`.sln`), the project folders, and the project files (`.csproj`, `.fsproj`)
    4. Search-and-replace across the whole folder and replace and text occurrences of the old name with the new name. Sublime Text and Atom have a tree view where you can right click -> Search in folder. Notepad++ has a "Find in files" option.
    5. Now open VS again and see if the project loads.
    6. Hunt around for any weirdly mis-spelt versions of the old name that may not have been caught by the search-and-replace.
    7. Specifically, check the **package.nuspec** for the package name. It should be the same as the solution.
    8. Now commit and push everything to Integration.
    9. Go to GitHub and rename the repository, if need be. You may need to get an adult with admin privileges to help you with this.
    10. Go to TeamCity.