1

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.

Community
  • 1
  • 1
Vyktor
  • 20,559
  • 6
  • 64
  • 96

1 Answers1

0

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):

clean filter driver

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I though about that, but I was hoping there's more levels of config one of which could be excluded (that one containing only include and library directories)... – Vyktor Oct 27 '12 at 13:28
  • @Vyktor you can declare as many filter you want in order to exclude as many personalized config you need. – VonC Oct 27 '12 at 13:35
  • Do you know any reasonable tutorial on them? I got lost when I tried to search on my own, so many unfamiliar terms :-S – Vyktor Oct 28 '12 at 18:55
  • @Vyktor beside the gitattributes mentioned in the git-scm book? (http://git-scm.com/book/ch7-2.html#Keyword-Expansion). On git itself, http://gitimmersion.com/ provides a nice introduction. – VonC Oct 28 '12 at 19:31