Fixing an XAF winforms project with a name typo

Ever started of a demo project in a fit of inspiration only to realise later you gave it the wrong name?

Here are some steps to fix it.

Take note of the current name


Use VS Replace in Files ( control+shift+F) to rename the typo in code.

  1. Exit the project.
  2. Find the project in Windows Explorer.
  3. Rename the project folder and the 3 sub folders.
  4. Rename the .sln file and the 3 .csproj files.
  5. Next use notepad to correct all occurrences of the bad name in the .sln file and the three .csproj files.
  6. Open the .sln in VS again.
  7. Use control+shift+f to replace all occurrences of the typo.
  8. Build.
  9. Re run the search and replace for any that got missed.
  10. Reset the startup project if needed.