冲突解决窗口don';t在Visual Studio 2015中使用TFS API和C#
有人知道如何解决我的问题吗 我正在使用一个控制台应用程序(我尝试使用windows应用程序),它使用C#与TFS API交互。 但当我尝试合并两个解决方案时,一些文件存在冲突,并且没有显示冲突窗口 以前,我使用的是Visual Studio 2013,一切都很好,但现在,我们改为VS 2015,DLL不在GAC中,但我改为Nuget 我尝试了本地工作区和服务器工作区 下面的代码在我调试时返回“评估超时”,并且没有显示任何窗口 workspace.MergeContent(冲突,true)冲突解决窗口don';t在Visual Studio 2015中使用TFS API和C#,c#,tfs,workspace,merge-conflict-resolution,C#,Tfs,Workspace,Merge Conflict Resolution,有人知道如何解决我的问题吗 我正在使用一个控制台应用程序(我尝试使用windows应用程序),它使用C#与TFS API交互。 但当我尝试合并两个解决方案时,一些文件存在冲突,并且没有显示冲突窗口 以前,我使用的是Visual Studio 2013,一切都很好,但现在,我们改为VS 2015,DLL不在GAC中,但我改为Nuget 我尝试了本地工作区和服务器工作区 下面的代码在我调试时返回“评估超时”,并且没有显示任何窗口 workspace.MergeContent(冲突,true) 微软
微软Visual Studio企业版2015 版本14.0.24720.00更新1 Microsoft.NET框架 版本4.6.01038 安装版本:企业版
TFS:TFS 2013
代码: Conflict[]conflicts=workspace.QueryConflicts(新字符串[]{“targetitem”},true) foreach(冲突中的冲突) {
}我也可以复制这个问题。不确定根本原因是什么,但我通过重新安装使其正常工作。安装Team Explorer 2013后,Workspace.MergeContent方法将使用VS2013 Shell调用合并工具。我也可以重现此问题。不确定根本原因是什么,但我通过重新安装使其正常工作。安装Team Explorer 2013后,Workspace.MergeContent方法将调用VS2013 Shell的合并工具。您使用的是哪个nuget软件包?嗨,Eddie,这是解决方案:您使用的是哪个nuget软件包?嗨,Eddie,这是解决方案:这是解决方案:这是解决方案:
public bool Merge(string branchOrigem, string branchDestino)
{
TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri("xxxxx"));
tfs.EnsureAuthenticated();
VersionControlServer vcs = tfs.GetService<VersionControlServer>();
Workspace workspace = vcs.GetWorkspace("xxxx", "xxxx");
GetStatus status = workspace.Merge(branchOrigem,
branchDestino,
null,
null,
LockLevel.None,
RecursionType.Full,
MergeOptions.None);
Conflict[] conflicts = workspace.QueryConflicts(new string[] { branchDestino }, true);
foreach (Conflict conflict in conflicts)
{
if (workspace.MergeContent(conflict, true))
{
conflict.Resolution = Resolution.AcceptMerge;
workspace.ResolveConflict(conflict);
}
}
return true;
}
"targetitem",
null,
null,
LockLevel.None,
RecursionType.Full,
MergeOptions.None);
if (workspace.MergeContent(conflict, true))
{
conflict.Resolution = Resolution.AcceptMerge;
workspace.ResolveConflict(conflict);
}