Using Visual Studio 6

2 minute read

Although there is no Visual Studio 6 add-in, you can parallelize such builds using the built-in option to generate NMAKE makefiles.

One-time export

Consider exporting makefiles (.mak) for the project and building the project using the NMAKE utility. To export a makefile, select Export Makefile from the Project menu in the Developer Studio. This is a one-time export, after which makefiles and Project files would potentially diverge.

To avoid makefiles and Project files diverging, instruct Visual Studio 6 to export makefiles automatically whenever the project changes:

  1. Go to the Tools menu and click Options.

  2. On the Build tab, select Export Makefile when saving the project file.

On-the-fly export

Makefiles can be generated from .dsw files via the command-line using the following technique documented on MSDN:

DevStudio provides some built-in commands for automation. To see a list of these commands, select Customize under the Tools menu and choose the Keyboard tab. The commands under the respective categories are listed. These commands can be launched in the same way that add-ins and macro commands are launched. To export a makefile for all projects in a workspace, do the following from the command line:

msdev.exe MyProject.dsw -execute BuildProjectExport
The command supplied using the -execute option is case sensitive. DevStudio should be in the path; otherwise, specify the full path in the preceding statement.

This launches DevStudio, opens the MyProject.dsw workspace file, and exports the makefile for all projects. There is a drawback in doing this—you will see the Export Makefile dialog box.

The same can also be accomplished using the following VBScript macro:

Sub ExportMakFile 'Export the makefile ExecuteCommand "BuildProjectExport" 'Close the workspace ExecuteCommand "WorkspaceClose" 'Exit from DevStudio Quit End Sub