sensei
sensei

Reputation: 7542

How to replace project in TFS source control with another project and keep same path in TFS

I have a Project.Awakening.Protocol.The.Return.Of.Jedi.Knight inside of TFS.

For some specific reason, I decided to rewrite project with new version in other folder outside of TFS.

What Is the best way to replace existing project with new project inside of the solution?

Should I delete the original project and check-in delete, then copy paste new folder into same structure, add new files to source control and check-in new files?

Is there any better way?

Upvotes: 0

Views: 1377

Answers (2)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51073

I wonder, if same files are just re-generated, I think you should be able to just check out existing project, replace the files after generation and then check in the updated files back; there is no need to delete and then re-add the project. For new add files of the project, check in the files; no need files, delete the files. It's the best insurance way.

As for your porposed way, it's the same as moving the project to a different folder in TFS source control:

  1. Move the project folder.
    • If the project is in source control, do the move using source control commands.
  2. Edit the solution file in a text editor. There should be only one path that you need to change.

Since you don't need the old project any more, you could simply delete or destroy (lose history) the project. For more info you could also take a look at Igor ostrovsky's answer in this question: Visual Studio move project to a different folder

Upvotes: 0

TToni
TToni

Reputation: 9391

I don't see anything wrong with your proposed way. Whether you want to check in after the deletion or not is up to you. It does not change the end result, just adds the deletion step to your history. Personally, I would do it for that reason.

Upvotes: 1

Related Questions