"Generate Build Scripts Dynamically," by Liewen Huang and Jennifer Clem [Visual Studio Magazine, October 2003]

This ZIP file contains the sample code for the Build Script Generator.

-----------------
ZIP CONTENTS
-----------------

<installation folder>
    \ BSG 
        \ Build Script Generator - the source code for the Build Script Generator.
        \ My Build            - scripts to run the build.
        \ Source Code Root    - BSG_bld.xml and
                              - dummy projects/solutions.


-----------------
Experiencing BSG
-----------------

1. Open and view the <installation folder>\BSG\Source Code Root\BSG_bld.xml file.  Note that ModuleB and ModuleC are excluded from the build.  Close the file.

2. Double click on <installation folder>\BSG\My Build\MyBuild.bat to start the build.
    BSG will first create the build script and then run the script with NMAKE.
    A folder named as "LatestBuild" will be created under <installation folder>\BSG.  All outputs, from Commons and ModuleA, will be copied to the LatestBuild folder.

3. Create a virtual directory in IIS and use "BSGSamples" as alias and map it to the "<installation folder>\BSG\Source Code Root" directory.  

4. Expand BSGSamples\ModuleB.  To create an application for "modBWebSvc", right-click and select Properties from the tear-off menu.  Click create on the Properties dialog and then click OK.

5. Open the BSG_bld.xml file in a text editor.  Remove ModuleB from the ExcludedFromBuild list.  Change the Directory attribute of the VirtualDirectory element from "c:\BSG" to "<your installation folder>\BSG".  Save BSG_bld.xml.
    All solutions under ModuleB will be included in the build.

6. Run MyBuild.bat again.
    ModuleB with 4 projects are included in the build this time.  Outputs are copied to the LatestBuild folder as well.

7. Modify BSG_bld.xml by removing ModuleC from the ExcludedFromBuild list and save.
    Solutions under ModouleC folder will be included in the build.

8. Run MyBuild.bat again.
    modCApp has a compilation error.  When the error occurs, MyBuild.bat opens modCApp.sln in the VS .NET IDE for you to correct the error.

9. Comment out "bad code" and continue the build by running MyBuild.bat

10. Run MyBuild.bat again.
    Note that no solutions are recompiled.

11. Modify Commons\cmmnA project by adding a Property to Class1.

12. Run MyBuild.bat again.
    Notice that modABO, modAApp and modCApp are also re-compiled since they depend on cmmnA directly or indirectly.
	