1

Does anybody know if it is possible to change the build configuration settings on a group of VS6 project files?

I'm working on a very large project which is still using Visual Studio 6 (I know) and the default build config is set to either Win32 DebugOCI or Win32 ReleaseOCI depending on the project.

I'm looking to change it to Win32 Debug across the board for consistency, and as a QoL improvement, rather than forget to check each time I make a different project active within the workspace.

Is there a way to do this for all of the projects within a workspace at once? Really not a fan of the idea of doing it manually for all ~475 projects.

Strongo
  • 173
  • 1
  • 8

1 Answers1

0

Visual Studio allows you to write 'User Defined Macros'

Menu option :Visual Studio -> Tools -> Macros

enter image description here

Macro would look something like this. Note: This is rough work.

Sub SetDefaultConfigurationMacro()
    ' Get all projects in the workspace
    Set ProjectsCols = Application.Projects
    for each Proj in ProjectsCols
       if Proj.Type = "Build" then
          Set ConfigCols = Proj.Configurations          
          for each Config in ConfigCols
             if InStr( Config.Name, "Debug" ) > 0 then
               Config.MakeCurrentSettingsDefault
             end if
          Next ' For 
       end if
    Next ' For 
End Sub

You will find entire set of Methods, Objects, Properties & Events supported by Visual Studio Developer Objects. Here

user1
  • 4,031
  • 8
  • 37
  • 66