Permitir configuraciones específicas del desarrollador en proyectos VS2008 Native C ++

Is it possible to combine the following properties, and if so, how?

  • Store in our version control system some Visual Studio 2008 native C++ (VCPROJ) project files for the developers in our team that use this IDE.
  • Allow some of those developers to tweak their projects (e.g. using debug version of third-party libraries instead of the usual ones).
  • Make sure these modifications are done in files that are not versioned.

In other words, I would like to allow developers to tweak some settings in their projects without risking that these changes are committed.

An 'optional VSPROP' file approach seems doomed to fail, as VS2008 refuses to load projects that refer to non-existent VSPROP files...

Any other suggestion? Is this possible with VS2010?

preguntado el 08 de enero de 11 a las 16:01

To me there seems to be a principial obstacle in this: how will you decide which settings should be shared and we can be tweaked per developer? VS 2005 has some settings (like debugging paths) stored in a separate .opt file, which is usually not version controlled. I am not sure about newer version. -

Best would be that each developer should be able to overwrite whatever settings he wants. But the first that come to my mind are the libs to link, and the include paths... -

Why not just have a user settings property sheet committed and lock it in source control so that changes can't be committed? Users can edit it locally as they see fit. -

4 Respuestas

You may not be able to do this but using a solution that generates the vcproj like CMake for example would let you do this. Scripts all your project with CMake and literally conditionally include a config file(if present for example) that developers can change on their setup.

Respondido 04 Feb 11, 21:02

Branches could solve this problem: you create a branch, play with different versions of third-party, merge changes to trunk if results are good.

Respondido el 08 de enero de 11 a las 22:01

This is not a matter of testing new lib, but rather allowing the developers some freedom in their projects without messing things for others... - Xavier Nodet

Well, as a preliminary solution you could put the project file into something like .hgignore or .gitignore after its initial commit. This way changes to it can't be done accidentally.

At least that's how I handle .hgignore itself.

Respondido 03 Feb 11, 16:02

What I would like is to be able to seperate the common part from the individual part, so that I can commit the common part whenever I need, without the need to mess with my individual settings to do so. - Xavier Nodet

Yep, I did understand that. That's why I only called it a preliminary solution. - Trass3r

We use a versionned "common_configuration" folder, and a script which copies project files from this "common_configuration" folder towards the "project" folder. We have another script to copy the configuration backwards, so the developpers need to make a conscious action to commit their local changes to the global version control system.

It answers partly your needs :

  • The upside : we have a way to keep a common configuration for everyone, and no accidental committing of local configuration
  • The downside : blindly copying the files actually crushes local changes. We live with it. We could write some more clever merger tool (using diff, or xml specific manipulations), but don't want to spend to much time on supporting the deployment tools.

Respondido 08 Feb 11, 13:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.