Skip to content

Instantly share code, notes, and snippets.

@deanbot
Last active February 28, 2018 18:24
Show Gist options
  • Save deanbot/76cae25f5fb95956123a8e5fa98344c3 to your computer and use it in GitHub Desktop.
Save deanbot/76cae25f5fb95956123a8e5fa98344c3 to your computer and use it in GitHub Desktop.
process for renaming visual studio solution and projects with vscode keyboard shortcuts
Close out of VS.
1. Open solution directory with VSCode - editor should not auto-run c# (if vs code don't activate c# extention)
2. rename solution file
3. For each project
1. Get name of old project (perhaps from the solution file).
1. Rename oldProject folder
2. Rename oldProject .csProj file
3. Find and replace all files in directory (if vs code right click > select 'Find in Folder' for any directory inside the solution directory and change Files to include to ./)
4. The following keyboard shortcuts after entering old project name in Search and new project name in Replace
1. ctrl+alt+enter
2. ctrl+alt+enter again
3. press enter to confirm
4. use ctrl+k then s to save all files
5. use ctrl+k then w to close all files.
5. Try building
Troubleshooting:
* If project not loading double check the name of the cs project is correct.
* Double check old project names are not used in ./.vs/config/applicationhost.config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment