TFS merge creates duplicate entries in Solution (project files)

匿名 (未验证) 提交于 2019-12-03 02:38:01

问题:

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

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

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.

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

回答1:

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.

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.

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.



回答2:

In a team of only 3 developers this issue affects us badly with VS2013 and TFS2013. The best recourse I could find was to disable automatic conflict resolution in the settings menu. http://donovanbrown.com/post/I-dont-trust-2012-Auto-merge-but-it-does-it-automatically-.aspx



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!