<ndoc> Task

# <ndoc>

Runs NDoc V1.3.1 to create documentation.

See the NDoc home page for more information.

Note: By default, only the NDoc MSDN documenter ships as part of the NAnt distribution. To make another NDoc documenter from the NDoc V1.3.1 distribution available to the <ndoc> task, copy the documenter assembly (and possible dependencies) to the "lib" directory corresponding with the CLR you're running NAnt on (eg. <nant root>/bin/lib/net/1.1).

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False
unless | bool | Opposite of `if`. If false then the task will be executed; otherwise, skipped. The default is false. | False
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False

### Nested Elements:

#### <assemblies>

The set of assemblies to document.

#### </assemblies>

#### <summaries>

The set of namespace summary files.

#### </summaries>

#### <documenters>

Specifies the formats in which the documentation should be generated.

Represents an element of which the XML is processed by its parent task or type.

#### </documenters>

#### <referencepaths>

Collection of additional directories to search for referenced assemblies.

#### </referencepaths>

### Examples

- Document two assemblies using the MSDN documenter. The namespaces are documented in `NamespaceSummary.xml`.

      <ndoc>
          <assemblies basedir="${build.dir}">
              <include name="NAnt.exe" />
              <include name="NAnt.Core.dll" />
          </assemblies>
          <summaries basedir="${build.dir}">
              <include name="NamespaceSummary.xml" />
          </summaries>
          <documenters>
              <documenter name="MSDN">
                  <property name="OutputDirectory" value="doc\MSDN" />
                  <property name="HtmlHelpName" value="NAnt" />
                  <property name="IncludeFavorites" value="False" />
                  <property name="Title" value="An NDoc Documented Class Library" />
                  <property name="SplitTOCs" value="False" />
                  <property name="DefaulTOC" value="" />
                  <property name="ShowVisualBasic" value="True" />
                  <property name="ShowMissingSummaries" value="True" />
                  <property name="ShowMissingRemarks" value="True" />
                  <property name="ShowMissingParams" value="True" />
                  <property name="ShowMissingReturns" value="True" />
                  <property name="ShowMissingValues" value="True" />
                  <property name="DocumentInternals" value="False" />
                  <property name="DocumentProtected" value="True" />
                  <property name="DocumentPrivates" value="False" />
                  <property name="DocumentEmptyNamespaces" value="False" />
                  <property name="IncludeAssemblyVersion" value="False" />
                  <property name="CopyrightText" value="" />
                  <property name="CopyrightHref" value="" />
               </documenter>
          </documenters>
      </ndoc>

  Content of `NamespaceSummary.xml` :

      <namespaces>
          <namespace name="Foo.Bar">
              The <b>Foo.Bar</b> namespace reinvents the wheel.
          </namespace>
          <namespace name="Foo.Bar.Tests">
              The <b>Foo.Bar.Tests</b> namespace ensures that the Foo.Bar namespace reinvents the wheel correctly.
          </namespace>
      </namespaces>

### Requirements

Assembly: NAnt.DotNetTasks (0.92.4543.0)