DocProject Templates
DocProject templates are used to create Visual Studio projects that build compiled help for their
project references (references to other projects in the same solution) and/or
external sources. When a project based on a
DocProject template is built, it produces a managed assembly and then its sources are built into a single compiled help file.
Template Types
There are two types of templates installed by DocProject:
DocProject templates and
DocSite templates.
DocProject Templates
DocProject templates (
DocProjects) are based on a class library project in the chosen language (e.g., C# or VB.NET). They include a registered
build process component and nothing else.
Choose a
DocProject template if you simply want to create user documentation and/or auto-generated reference documentation in a single compiled help file. You can modify the default
build process component to add custom build steps that execute various tasks, such as sending you an email when the process completes, for example.
DocSite Templates
DocSite templates (
DocSites) are based on an
ASP.NET Web Application project in the chosen language (e.g., C# or VB.NET). They also provide the same features as regular
DocProject templates.
Create a project based on a
DocSite template if you want to create a website that provides your help content to web users or the company intranet. You can modify the default
build process component to add custom build steps that execute various tasks, such as including custom HTML topics in the table of contents (TOC), for example.
For more information, see
DocSite Templates.
Note: Visual Studio Web Application projects are different from
Visual Studio Web Site projects and may require an update for your instance of Visual Studio. For more information see
How To Configure Visual Studio 2005 For DocProject.
Template Languages
The language that you choose for your
DocProject or
DocSite does not affect which projects you can build compiled help for, in terms of language. In other words, you can reference any Visual C#, Visual Basic, Visual J# or Managed Visual C++ project to build compiled help from within the same solution as a
DocProject or
DocSite, regardless of the language you choose for the template. The chosen language also has no affect on
external sources, such as reflection files or managed assemblies built in any language.
So why are there multiple language templates?
The language you choose for a
DocProject or
DocSite will be the language of the
build process component file and will serve as the language for any other code files that you add to the project in the future. Since
DocProjects and
DocSites are actually normal Visual Studio projects, you can develop them as you would any other project with code files using the project's language.
Build Process Component
A
build process component allows you to dynamically hook into the help build process. It is a class in a
DocProject or
DocSite that derives from
DaveSexton.DocProject.BuildProcessComponent and is registered with the
DocProject or
DocSite in the
DocProject Properties window. (See
How To Configure DocProject.)
Note: Express editions of Visual Studio support a
build process component but to change the registered type you must use the
DocProject External UI.
The
DocProject and
DocSite templates create a default
build process component, which is automatically registered with the new project. The default implementation simply prints the time each build step takes to execute, and the total time for the entire build process, to the Visual Studio Output window. Remove or extend the functionality of this class as you see fit.
The assemblies produced by each template, including the
DocSite templates, are used by DocProject to execute the registered
build process component each time the project is built.
For more information, see
Build Process.
Installed Templates
The DocProject installer adds these new templates to Visual Studio for building compiled help. Depending upon whether you are using a Visual Studio Express edition or higher, you may only see a subset of these templates:
DocProject (C#)This template is based on a simple Visual C# class library. It's empty except for a
build process component.
DocProject (VB.NET)This template is based on a simple Visual Basic.NET class library. It's empty except for a
build process component.
DocSite Web Application (C#)This template provides an AJAX-enabled ASP.NET web application in C# that builds a web interface for your documentation. A
build process component is included as well.
DocSite Web Application (VB.NET)This template provides an AJAX-enabled ASP.NET web application in VB.NET that builds a web interface for your documentation. A
build process component is included as well.
Custom Templates
To create your own templates, follow the instructions in the
Creating New Templates tutorial.