![]() ![]() Also not directly in the fix, but if the elements were in a known order (simple alphabetical as in the IDE I'd say) then merge tools have the option of making some more intelligent decisions. I'd argue that you're far more likely to have more developers, more branches, and commit conflicts as the project grows larger. The simple sorting would help tremendously: it would not change the format, yet almost always eliminate the same-point-in-the-list insertion behavior we always see. While I agree it doesn't eliminate the problem in your example: that neighbor addition for our large projects, it's a very minority case. csproj sorting in Visual Studio on user voice a while ago. Found a typo or mistake in the post?įirst, I agree this decision the right direction - a break is absolutely what I want to happen here. There will still be the occasional conflict in the file, but they’d be very rare. Wild card support would make this problem almost completely go away. So any time two different branches adds files that would be adjacent, you run the risk of this conflict. In the example I presented, every element remained sorted throughout my example. But it doesn’t make the issue of merge conflicts go away. That helps reduce the incidental conflicts caused by Visual Studio’s apparent non-deterministic sort of elements. It’s been suggested that if Visual Studio sorted its elements first, that would help mitigate the problem. csproj issues could we write one that isn’t perfect but good enough to handle common merge conflicts? Perhaps.Įven if we did this, the merge driver only solves the problem for one version control system, though arguably the only one that really matters. Though I wonder if we limited it to common. If it were easy, or even moderately hard, it would have been done already. If I could wild-card a directory, I wouldn’t need to add an entry to *.csproj every time I add afile.Īnother way would be to write a proper XML merge driver for Git, but that’s quite a challenge as my co-worker Markus Olsson can attest to. One of the big reasons to do this is to ease the pain of merge conflicts. csproj files are already supported by MSBuild, but Visual Studio doesn’t deal with them very well. I recently asked folks on Twitter to vote up this User Voice issue asking the Visual Studio team to support file patterns in project files. We don’t live in that universe, but maybe ours could become more like that one. Obviously, in some idyllic parallel universe, git would merge the full CCC element after the BBB element without fudging it up and without bothering us with these pesky merge conflicts. Designer MSBuild:Compile Designer MSBuild:Compile ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |