.vcxproj in source control

随声附和 提交于 2020-01-03 07:00:10

问题


I have been reading lots of questions regarding whether vcxproj files should be added to source control or not. The consensus seems to be that they should, but when opening the files I noticed that there are a lot of user specific paths contained within.

Seeing as this is a project that is being worked on by a number of people, should I still add it to source control? It seems like it would clash with other peoples' setups.


回答1:


Of course they need to be added to source control, .vcxproj is the project file. Quoting MSDN:

Project files no longer use the .vcproj file name extension. Visual Studio automatically converts project files that were created by an earlier release of Visual C++ to the format that is used by the current system. For more information about how to manually upgrade a project, see /Upgrade (devenv.exe).

In the current release, the file name extension for a project file is .vcxproj.

The .vcxproj.user files, on the other hand, do not need to be added to source control. The link above describes what each of these files contain as well.




回答2:


It is the project file for your project. So yes, you'd better check that in. The only file that you might not want to check-in is the .vcxproj.user file. It contains user-specific overrides, particularly debugger settings.

You could only make such a mistake if you are not operating Explorer in "programmer" mode. It has the nasty habit of hiding filename extensions. Fix that with Control Panel + Folder Options, View tab, untick the "Hide extensions for known file types" checkbox.



来源:https://stackoverflow.com/questions/13015265/vcxproj-in-source-control

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