Command Line Assembly Import

In addition to the Wizard Import interface you can also run Help Builder to import an assembly in command line mode. Help Builder can automatically build a a help project and compile it for you on demand. You can hook this up as an after build step for example after compiling an assembly.

<HelpBuilderPath>\wwhelp.exe AssemblyImport 
  <full assembly path> 
   <documentation path> 
   <Project Name> 
   <IncludePrivate | ExcludePrivate> 
   <IncludeInherited | ExcludeInherited> 
   <OverWrite | KeepExisting | Clear> 
   <ShowHtml | None>
   <ErrorOutputFile | None>

Parameters are positional, but only the first two are required. All parameters that contain spaces should placed in double quotes (standard Console rules) and must be written on a single line.

Assembly Path
The path to the assembly or assemblies. This parameter can include a comma delimited list of assemblies. The path(s) used here can either be a full path or a relative path to the directory from which you are running Help Builder.

Documentation Path
This is the path where the project is created. Again this path can either be a full path or a relative path. The directory is created if it doesn't exist.

Project Name
The name of project, which is what is displayed in the Index root node of the project.

IncludePrivate,ExcludePrivate
Flag that determines whether the import pulls in Private and Protected members. Default is ExcludePrivate.

IncludeInherited,ExcludeInherited
Determines whether inherited type members are imported. Default is ExcludeInherited.

OverWrite,KeepExisting,Clear
Determines how imports handle existing projects. Overwrite overwrites existing member values with the new import. KeepExisting keeps any existing data and only fills blank member fields. Clear removes the entire project and recreates everything from scratch. Default is Overwrite.

ShowHtml,None
Shows the HTML output for the project when compilation is complete.

ErrorOutputFile,None
You can specify an output file that will receive failure messages. When specified the error output file is created only if errors occur - on success no file is created.

If not specified errors are displayed with a MessageBox.

A special value of none can be used to do nothing when errors occur (ie. no file created and no MessageBox)


Example:

d:\installs\wwhelp\wwhelp.exe AssemblyImport 
   "d:\projects\wwbusiness\bin\debug\wwbusiness.dll"
   "d:\temp\wwBusinessDocs"
   "West Wind Business Components" ExcludePrivate ExcludeInherited OverWrite ShowHtml 
   "d:\temp\erroroutput.txt"

This interface is also available via the wwHelpImportVcx COM interface.

Assumptions:
A few assumptions are made about how the assembly import process operates.

  • Project is created if it doesn't exist
    You provide a project directory and Help Builder creates a project there with the same name as the directory. If the project exists already the import is done into this project.

  • Multiple Assemblies
    You can point multiple assemblies at the same project path which causes Help Builder to write each assembly to the same project file.

*** XML Documentation file must exist in same path as the assembly**
If you want XML documentation included make sure that the documentation has the same name as the assembly and lives in the same path.

Simplifying operation:
To simplify operation of the command line you might want create a batch file and store it with your project or global dev path to set just the necessary flags. For example, mine looks like this:

: HelpBuilderImport.bat
: pass: "Full Assembly Path" "Full Project Path" "Project Name"
d:\installs\wwhelp\wwhelp.exe AssemblyImport "%1" "%2" "%3" ExcludePrivate ExcludeInherited OverWrite ShowHtml

© West Wind Techologies, 1996-2023 • Updated: 12/14/15
Comment or report problem with topic