Build Process

NDoc3

Using NAnt

No tutorial available yet. You can contribute a tutorial by sending a mail.

Using VS.NET Build Events

Build events can be used to invoke NDoc3 when build a VS.NET solution. Because NDoc3 builds can be time consuming it is recommended that they only be included in Release builds or in a special documentation build configuration.

Because build events for C# projects are not configuration based, it is necessary to check the configuration name if you do not want NDoc3 to run every time a build occurs. This can be accomplished using VS.NET's built in build variables:

	if $(ConfigurationName) == Release

Because specifying all of NDoc3's command line paramters directly in the build event editing window can be difficult and error prone, calling a batch file can be easier to manage and maintain. Use the Post-Build event for the last project in the solution that will be built or for each project for which you want seperate documentation.

Calling a batch file from the post-build event

For simple solutions the following batch file will invoke NDoc3 for each Release build.

IF NOT %1 == Release GOTO end

"%ProgramFiles%\NDoc3\bin\NDoc3Console.exe" -recurse="%2bin\%1"

:end

More complex solutions may require additional parameters such as reference directories etc.

Using Other Build Tools

NDoc3 can be included in builds orchestrated by any build tool that supports executing command line applications. The exact mechanism will be specific to the tool, but most (if not all) support arbitrary execution of executables with paramters.