TFS 合并在解决方案(项目文件)中创建重复条目 [英] TFS merge creates duplicate entries in Solution (project files)

查看:21
本文介绍了TFS 合并在解决方案(项目文件)中创建重复条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用 TF 服务.根据最佳实践,我们会频繁执行合并.

We are using TF Service. As per best practices, we perform frequent merges.

合并工具在处理我们项目文件的合并方面做得很差.我们获得了视图、控制器甚至我们的 PublishProfiles 文件夹的重复项.

The merge tool does a bad job handling merges for our project files. We get duplicates for Views, Controllers, even our PublishProfiles Folder.

我很难相信 TFS 还没有经过优化来处理像骗子这样微不足道的事情.我们的控制器、EDMX 文件和视图中的逻辑在合并时应该更复杂,但处理得更好.

I have a hard time believing that TFS hasn't been optimized to deal with something as trivial as dupes. The logic within our controllers, EDMX files, and Views should be more complex to merge, yet are handled better.

我们是不是做错了什么?更具体地说,是否有 TFS 选项或设置可以更好地处理此类问题.

Are we doing something wrong? More specifically, is there an option or setting for TFS that better deals with such issues.

推荐答案

这是 Visual Studio 2010 附带的不太好的合并工具的一个已知问题,并且这个 Visual Studio 2012 有一个完全更新的合并工具,可以执行上下文合并XML 文件之间,这大大降低了出现这些类型问题的机会.由于您在 Visual Studio 2012 中看到了这一点,我很想看到几个出错的示例.升级到 Visual Studio 2012 后,我没有遇到重大问题.

This is a known issue with the not so good Merge tool that accompanies Visual Studio 2010 and this Visual Studio 2012 has a completely renewed merge tool that can do contextual merges between XML files, which greatly reduces the chance of these types of issues cropping up. Since you're seeing this in Visual Studio 2012, I'd love to see a couple of examples that go wrong. I haven't had major issues since upgrading to Visual Studio 2012.

作为最佳实践,我倾向于在添加新文件之前始终执行 Get-Latest.而且我总是在得到解决方案再次编译后尽快签入.当您在同一分支上工作时,这会减少出现这些问题的机会.不过,在两个分支之间进行合并时,您可能仍会遇到这些类型的问题.

As a best practice, I tend to always do a Get-Latest before adding new files. And I always check in as soon as possible after getting the solution to compile again. This reduces the chances of these issues when you're working on the same branch. You might still end up with these types of issues when doing a merge between two branches though.

此外,不是对所有文件类型使用 Visual Studio 2012 合并工具,您可以为特定文件扩展名设置自定义合并工具,这样您就可以使用任何商业或开源合并工具而不是默认的合并工具.有很多很好的例子:

Additionally, instead of using the Visual Studio 2012 merge tool for all file types, you can set a custom merge tool for specific file extensions, that way you can use any commercial or open source merge tool instead of the default one. There's quite a few great examples out there:

您的里程可能因不同的工具而异.

Your mileage may vary between the different tools out there.

这篇关于TFS 合并在解决方案(项目文件)中创建重复条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆