添加包含目录 - 团队安全 [英] Adding include directories - team safe

查看:151
本文介绍了添加包含目录 - 团队安全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Visual Studio 2010专业项目中使用MySQL连接器,它需要。


I'm using MySQL connector in my Visual Studio 2010 Professional project which requires changes in project settings:

  • Include Directories
  • Librarie Directories

Those settings are stored in foo.vcxproj among with the list of files to be compiled (correct me if I'm wrong). The problem is the project is developed by many people (we are using git as our version control system) and we need to actualize foo.vcxproj which results into breaking Include Directories settings.

Is there a way to create something like "project (solution) specific settings in separate file" which would allow everyone to have his/her own file containing just those 3 lines defining these paths?

NOTE: I've already found this, but I'm not sure whether this is the way and what's the common/best practice for problems like these.

解决方案

If you can:

  • detect the content of a foo.vcxproj file,
  • and separate the 3 personnalized lines from the rest of the content,

you could then use a git mechanism allowing you, on git add, to restore the right content (without the three lines), while making it possible for the developers to add their own settings recorded in said foo.vcxproj.
The 'cleaning' process would be done by a script ("clean"), declared as a gitattributes filter driver (which only has the content, and not the path or name of the files it filters):

So you would have your personalized file in your working tree, but what you had back to the index is the original content.
See the Git-scm book for an example.

这篇关于添加包含目录 - 团队安全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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