在版本控制中维护Visual Studio vcproj项目文件的建议 [英] Suggestions for maintaining Visual Studio vcproj project files in version control

查看:87
本文介绍了在版本控制中维护Visual Studio vcproj项目文件的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft Visual Studio使用XML保存其.vcproj项目文件.因此,比较XML项目文件 应该很容易.

Microsoft Visual Studio uses XML to save its .vcproj project files. So diffing XML project files should be easily.

不幸的是,如果您更改了项目文件的任何属性,Visual Studio会坚持随机改组项目文件的XML节点!这使得文本差异和项目文件更改的合并基本上是不可能的.更改一个编译器设置可以使我的视觉差异工具认为我已经更改了文件中50%的行!我什至尝试了一些XML差异工具,但它们只是显示了相同混乱情况的结构化视图.

Unfortunately, if you change any of the project file's properties, Visual Studio insists on randomly shuffling the XML nodes of the project file! This makes textual diffing and merging of project file changes basically impossible. Changing one compiler setting can make my visual diff tool think I've changed 50% of the lines in the file! I've even tried some XML diff tools, but they just show a more structured view of the same mess.

有人对在源代码管理中维护.vcproj文件有任何建议吗?或者说服Visual Studio 重新排列.vcproj文件中的XML节点的方法?

Does anyone have any suggestions for maintaining .vcproj files in source control? Or a way to convince Visual Studio to not rearrange the XML nodes in the .vcproj file?

(我还研究过使用CMake之类的工具从对diff更友好的文本文件中生成.vcproj文件,但是CMake有其自身的问题.)

(I have also investigated using tools like CMake to generate .vcproj files from a more diff-friendly text file, but CMake has its own problems.)

推荐答案

这似乎有时会出现.

对于插件或其他规范化工具来说,也许这是一个成熟的问题.

Perhaps it is a problem ripe for a plug-in or other normalizing tool.

在MS决定对其进行修复之前,这将是一个很好的副业.那么您就不走运了-除非他们当然愿意提供您的IP.

It would be a great side-business, until MS decides to fix it. Then you're out of luck - unless of course they offer to buy your IP.

有人想要启动一个开源项目或商业产品吗?我在玩游戏.

Anyone want to start an open source project, or commercial product? I'm game.

我可能会使用独立的规范化工具,然后查看是否可以将其转换为插件.

I might have a go at a stand-alone normalizing tool, then see if I can turn it into a plugin.

这篇关于在版本控制中维护Visual Studio vcproj项目文件的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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