views:

280

answers:

2

Actually i come around a problem i get more often into as i like to:

Consider the following: You just made a new solution/project and start creating/adding all the stuff you need. While you're doing so, you're always on the way within the debug configuration. You make changes to your configuration (in C++ projects especially compiler, linker settings) and at the end of the day you just want to swap to release mode to make a final build and what happens?? You got plenty of error messages about missing defines, linked libraries, preprocessor definitions, precompiled headers, etc.)

And now? You open the Project Properties, select each item in the tree view and switch for and back with the combo box of the Configuration at the top left.

Due to the fact, that both configurations are saved within one file you can't also use a simple Diff-Tool or you have to copy and paste both parts out of the project file into two different files, compare them and merge everything back into the project file.

Isn't there a better solution to compare different configurations within one project??

+1  A: 

I don't have a perfect solution to compare within a project file... but for what it's worth, you may find it helpful to compare the current project file to the copy in source control. And then where you see a changed value in one section, you can quickly see whether that value is also changed in the other section.

But your question specified a new project... so I'll assume it isn't in source control yet.

So here's another option: Copy the project file to another name and then compare the two copies. Yes, they'll be the same... but if you use a good tool such as Beyond Compare 2 that allows you to manually align sections then you can right click on the first line of the debug section in the left window and select Align Manually and then right click on the first line of the release section in the right window and select Align Manually. Voila... there are your changes. :)

Philip Davis
These are quite good options and i already try to do this stuff more or less these ways, but they feel uncomfortable and ugly. Especially the usage of diff tools (even the VS built-in version for source control) just shows that the tools are already there.All we need is a mechanism, that splits up the xml file correctly to show two versions (eg debug, release) beside each other and that you don't have to do this manually.
Oliver
+1  A: 

There's a program called BeyondCompare3 that is very cheap. I rarely endorse products, but it should do the job for you here. Use the "Compare selection to clipboard" option.

Russell Steen
As i already said, i try to accomplish these tasks with an external diff tool. But it just feels so uncomfortable to open the raw xml files and manually align the two sections, so that the diff tool compare these two sections.
Oliver
Did you use this specific tool? There is a lot of variation between diff tools. With BeyondCompare 3, you just highlight the areas to be compared. It still takes effort, but not as much as aligning.If you are looking for automagic "fix my configuration" answer, you're going to have to write it yourself. It's a small enough problem that there aren't going to be tons of people out there writing a utility, free or otherwise, to address it.
Russell Steen