First the good. My current C++ projects were updated from VS6.0 so the project files are quite messy. One project file was 250KB large. One of the feature I like about VS2K5 is unloading the project (right click on the project in the Solution Explorer). Then right click it again and choose Edit project. Ta-da, you can edit the raw XML of the project. Now in my projects I had for each file, extras that were always blank.
<File RelativePath=“ActDt.cpp” > <FileConfiguration Name=“Debug|Win32” > <Tool Name=“VCCLCompilerTool” AdditionalIncludeDirectories=“” PreprocessorDefinitions=“” /> </FileConfiguration> <FileConfiguration Name=“Release|Win32” > <Tool Name=“VCCLCompilerTool” AdditionalIncludeDirectories=“” PreprocessorDefinitions=“” /> </FileConfiguration> </File>
The Italics parts are just filler, as they are not add any new options. So using the fancy Search-and-Replace (Ctrl-H) and this handy visual studio regex
^:b+\<FileConfiguration\n(.*\n)(.*\n)(.*\n)(.*\n)(.*\n)(.*\n)(.*\n):b+\</FileConfiguration\>\n to can find all the blocks, and replace with empty. But you don’t actually want to use the above regex, as it will match lines that with seven inner lines but things like
which you don’t want to lose. So I changed it to
So now we know only blank entries will be removed, we can charge ahead and press the Replace All button. Oh the rush, did it work? Anyway after the trimming the large project is only 35KB now. The above file block only has two build targets, but the large project had seven, thus every file had seven FileConfiguration blocks.
After editing, close the project file, then right click to Reload it.
Now the other part of this post is for me to rage that devenv.exe (Visual Studio) keep using 100% of one of my CPU’s when editing/debugging more than one solution at once. Which is really annoying as I have 4-5 programs in our product, and I want to debugging then concurrently. It seems that if I start a new copy of VS while another is debugging it’s lost to the weeds until I reboot.
It gets tiring having the debugging going to a crawl. The whinge is now out of my system now, thank you.