TFS API MergeContent returns false without showing

2019-02-20 03:54发布

I am calling the MergeContent method on a TFS workspace (App.Instance.TFSWorspace in my example) as shown below:

bool result = App.Instance.TFSWorkspace.MergeContent(Conflict, true);

This results in 'result' being set to false but the Merge Tool is never shown even though the second parameter explicity states to use the external merge tool.

The code was originally placed in a RelayCommand following the MVVM model. Just to make sure this wasn't the issue I moved it into the code behind and the same thing still happens. Also, I'm using the default TFS tool, I don't have any 3rd party compare/merge tool configured.

Does anyone have any idea why this would happen?

标签: api tfs
1条回答
太酷不给撩
2楼-- · 2019-02-20 04:25

A couple of potential reasons this may occur:

  1. diffmerge.exe is not in the path of your running program The default external merge tool is diffmerge.exe found in \Microsoft Visual Studio 10.0\Common7\IDE (maybe different based on your version). If this is not in the path of your program it will fail to start the diffmerge process when a conflict occurs

  2. Program does not have a UI shell This can occur if your program is a service or web app. This may not be the case for you but I was not completely sure from the description

Most likely the issues is #1 above. I would check that first.

查看更多
登录 后发表回答