PDA

View Full Version : VS - saving project configurations, applying them automatically


-Vormav-
05-01-2006, 06:08 PM
Hey. Just another quick Visual Studio question to throw at the group... the VS boards on MSDN don't seem to be too terribly active...
But anyway, basically, I have multiple configurations that handle compiling against different versions of an API. So, I might have configurations like 1.2Debug, 1.2Release, 1.3Debug, 1.3Release, and so forth.
Now, all I really need to be able to do is find out how to freaking save all of these configurations out so that I can quickly and effortlessly add them to newly created projects. If I can automate the process, all the better; I've already built a VC Wizard for my project - which I had originally started specifically for automating this, thinking that it would actually be a simple and straightforward thing to do (wroung!).
At this point, the easiest solution seems to be manually pasting in the appropriate XML configuration tags directly into my .vcproj file, which is still far from being 'automated', and a pretty ugly solution to what should be an easy problem. But does anyone know a good way of handling this?

billrobertson42
05-02-2006, 12:29 AM
Automated or not, the question is do you have to do it once or many times. If you only have to do it once then go for it. Just make sure to keep notes on what you do so if you need to recreate it later you can.

If you work with a team of people, and assuming you don't find a "better" answer, then you should script the changes so your team-mates can make the same changes w/o fear of introducing errors, and so that new developers can get started quickly.

-Vormav-
05-02-2006, 02:22 AM
I'm all for scripting it. The defaul.js file used in wizards/templates even has a specific function for scripting specific configuration values. The only problem with this is that, as far as I can tell from the tests I've done, you can't actually create new project configurations through this file - only make changes to debug/release - which definitely isn't cutting it. The project setup I'm working on relies very heavily on having all of these separate variants of debug/release.
What would really be ideal for me is if I could create a new project, setup all of the appropriate configurations, and from there on have all my new projects created from my template automatically inherit the different configurations from that base setup project. When I'd make a change to the configurations in this file, those changes would show up in projects that reference it - and since it would be a .vcproj file, I wouldn't have to make changes in XML, but would actually be able to use Visual Studio's property pages to make changes. From there, everybody that runs this setup on their own computers could reference a similar base file on their own computer, or they could even reference a base file over a network. That was sort of my thinking behind having a defaul.vcproj file as a part of my project wizard/template. But at this point, as long as I can just find a way to have these different configurations created for me automatically when I use my template, I don't really give a damn. I just want them there. I'm pretty close to just throwing together a python script to edit my newly created .vcproj files at this point. :argh:

billrobertson42
05-02-2006, 10:23 PM
Sounds more like a good source code control tool will be a better fit for your needs here.

e.g. subversion or cvs.

CGTalk Moderation
05-02-2006, 10:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.