1

When I rename my Git controlled Visual Studio solution, I lose all the changes. An error appears in the output window that says something like <new-solution-name>.VC.opendb can't be opened. What's going wrong?

Kara
  • 6,115
  • 16
  • 50
  • 57
BSalita
  • 8,420
  • 10
  • 51
  • 68

1 Answers1

3

The problem is that Visual Studio doesn't rename all the solution related files. The fix is to edit .gitignore (manually or within VS) to rename the missed files. The missed files will have the old solution name. Rename them to the new name.

Before:

/<old-solution-name>.VC.VC.opendb
/<old-solution-name>.VC.db
/<old-solution-name>.sln

After:

/<new-solution-name>.VC.VC.opendb
/<new-solution-name>.VC.db
/<new-solution-name>.sln
BSalita
  • 8,420
  • 10
  • 51
  • 68
  • Sorry to bother you, but since you figured some git + visualstudio problems would you be so kind and take a look at this http://stackoverflow.com/questions/33496004/code-lens-not-working-properly-after-interactive-rebase and give some insight? – Peuczynski May 18 '16 at 20:35