Build Scripts

  • 466 Views
  • Last Post 23 March 2016
DerekMaciak posted this 02 March 2016

Accelerator version 6.2 offers a new and improved project dependency analysis and build script generator.

To take advantage of the new tool, you will need to generate your build script with Accelerator version 6.2. To do this, open the Accelerator LaunchPad and click on the Tools button on the left side. Then click on the Code Generator button. In the Code Generator, (1) Select your System Generation Configuration File and then (2) Click the Generate Build Script button.

Another window will popup. You can leave all the defaults and click the Run Tool button.  You will get a message popup once the tool has completed.

This will generate the build script (.bat) and MSbuild file which has the build layers as determined by the project dependency Analysis (.msbuild) to the Output Directory. Note: the "Max Circular Reference Depth" is the number of levels to hunt for circular references. 4 should be plenty to find a circular reference. You may increase this if you suspect a circular reference is deeper. The circular dependency tool will take longer as this number increases. 

Here are the files that may be generated based on the inputs and analysis:

  • <systemName>_msbuild.bat 
    • Always generated - This is the bat file that you can double-click to excute the msbuild file. This will delete all dlls in your solution bin and obj folders. It will then run the dependency tool and exceute the build.
  • <systemName>_gen.msbuild
    • Always generated - this is the msbuild file that the bat file executes. This file has the project build layers from the project dependency analysis.
  • <systemName>_WARNINGS.txt
    • Generated from dependency analysis tool to warn you of any bad DLL references. If you see this file, look at the warnings and fix the references in your solution.
  • <systemName>_CircularReferenceGraph.txt
    • Generated from dependency analysis tool if circular references were found. If you see this file, see instructions below on how to view the graph.
  • <systemName>_BuildLayerGraph.txt
    • Generated from dependency analysis tool if "Generate Diagram Files?" is checked prior to running the tool above. See instructions below on how to view the graph.
  • <systemName>_DependencyGraph.txt
    • Generated from dependency analysis tool if "Generate Diagram Files?" is checked prior to running the tool above. See instructions below on how to view the graph.

If a file is generated that ends with Graph.txt, you can download a graph viewer from Graphviz - Graph Visualization Software

After you install the software, you can run the tool (gvedit.exe) and open any of the files that end with Graph.txt.

Here is an example of 2 circular references found by opening the <systemName>_CircularReferenceGraph.txt in GVEdit. You will need to resolve any circular references in order to get a clean build.

dwebb posted this 23 March 2016

Accelerator v6.2.1 supports ignoring folders when the build script is searching for sln and csproj files to include in the build.

In your BuildScripts output folder, create a file named Folders.ignore with the following content:

# List of folders to ignore for build; one per line and relative to root folder
# If needed, use \\ as a folder separator
NuGetPackages

Add any additional folders you need. NuGetPackages is included because some packages from NuGet include source code with sln and csproj files, but you don't want to include those when rebuilding your own projects.

Close