4

I've renamed one of the projects in a Visual Studio solution. Renaming the project involved renaming its directory and as a result the paths to some files have changed. The solution is under TFS source control. When trying to check in I get a "file not found" error displaying the old path of one of the files. How do I check in the changes?

snakile
  • 52,936
  • 62
  • 169
  • 241
  • Yeah, it happens even if you only rename a file. Maybe it can throw some light: http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/6cecdce6-520c-4f07-b1fd-d6db65f337dd/ – Ademar Apr 30 '13 at 11:32
  • Best answer I've found for this: http://stackoverflow.com/a/10853509/10245 – Tim Abell May 23 '14 at 22:10

1 Answers1

1

As I know, when you rename the project, underlying source folder path keeps unchanged (maybe it depends of Visual Studio version).

Try this:

  1. Rename the project folder from Source Control Explorer.
  2. If you have errors with old path, try to unload the project from Solution Exproler, open proj file for edit, and replace old path entries with a new one.

Don't forget to update references from other projects.

Yuriy Shinbuev
  • 427
  • 4
  • 7
  • My issue was I had a project for XXX.YYY.Base which was a class library and XXX.YYY which was a web api project. I changed my class library to XXX.YYY and changed my web api project to XXX.YYY.WebApi and it threw TFS for a loop (understandably). I had to basically check in a bunch of "bad stuff" then was able to rename everything properly through source control explorer. – Kyle Crabtree Jun 04 '20 at 12:51