0

I try to automate some TFVC actions so I wrote a PowerShell script that tf.exe to do some commands.

I want to perform check in with tf checkin .... and resolve the conflicts in the window that opened.

When I try to compare the files or to open the changes in merge tool I got the error:

TFS10201: Source control could not start the manual merge tool

If I go to Visual Studio and try to it there is no problem. the error occurs only when I run tf checkin in PowerShell and then a small windows is opened.

enter image description here

(In the photo is deleted file but in VS there is no issue, also, in PowerShell I got the error also in regular merge ).

How can I resolve it?

P.S. I have VS 2015 & 2017 installed.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114

1 Answers1

0

According to the error info, looks like the error happens when there is a merge conflict since the file doesn't exist locally on the target branch. For example:

When you have a TFS workspace but have deleted the files on your local machine. TFS at this point things that you have the latest source and attempts to merge the file.

However, since the files are not there, it throws this error. This error would only happen for files that have merge conflicts.

Take a look at similar solution in this blog.

Give a try with the suggestion which is to do a forced get latest of the file on the target branch and this would be resolved.

If above still not work, suggest you delete that local workspace (back up first) and create a new one, do a get latest from server side. Finally modify files, check in pending changes and resolve the conflicts. Which may do the trick.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • I did try it before I posted the question, but the same error :/ as I wrote, in the VS it works fine, and in other computers also. only in specific PC from PowerShell it doesn't work. – Shayki Abramczyk Jul 30 '19 at 05:53
  • Hi @ Shayki Abramczyk I could also not reproduce it in our test environment. When you say it works fine in other computers. Did you mean it works fine with VS or it works fine with VS from Powershell in other computers? If this works properly in other computer with powershell script. This may related to a cache issue. Suggest you give a try with clear Visual Studio cache in that specific PC. Besides, did the error only occur for that target branch or all branches? This will also help to narrow down the root cause. – PatrickLu-MSFT Jul 30 '19 at 07:38
  • 1
    Hi, yes, in other computers it works also in VS and also in PowerShell, but in a few computers we got the error only in PS. I will try clean the cache and I will update. thank you for your replay! (I think the errors occurs in all branches). By the way, if I have VS 2015 & 2017 installed, which one opened in the prompt windows when I do `tf checkin`? – Shayki Abramczyk Jul 30 '19 at 07:45
  • hi again :) I tried to delete all the VS cache but is not solved the issue :( – Shayki Abramczyk Jul 30 '19 at 08:34
  • @ShaykiAbramczyk Sounds like really wired. I also tested another computer and another branch, still works. Have no idea about the root cause in your side. Maybe the target file of branch already be opened (Since you tested in Visual Studio) Just like this https://stackoverflow.com/a/22364146/5391065 . Besides, you could also try to RESTORE THE MICROSOFT DEFAULT MERGE TOOL as another answer suggested in above similar question. This may do trick if you use powershell to involve the merge tool – PatrickLu-MSFT Jul 30 '19 at 10:08