This project is read-only.

Creating a DocProject or DocSite for a new solution


This tutorial walks you through creating a new solution, a new source project and a new DocProject that will build compiled help for the source project.

The following steps should be taken after the successful installation of DocProject and any additional software that is required, such as Sandcastle. See the Latest Release Notes for more information.

For more information about the DocProject and DocSite templates, see DocProject Templates.

Create a Solution and Source Project

  1. Run Visual Studio 2005 or 2008.
    1. Any edition may be used, including Visual C# Express or Visual Basic Express.
  2. In the empty environment, without any solution loaded, create a new project:
    1. Select File > New > Project...
    2. In the new project dialog select a language on the left. Visual C#, Visual J#, Visual Basic and Managed Visual C++ are supported by DocProject.
    3. Select a project type on the right. For this tutorial choose Class Library, although any will do.
      1. Note: Do not select one of the DocProject templates now.
    4. Enter any name that you'd like for the new project.
    5. Click OK.
  3. Save the solution.

Configure the Source Project

  1. Open the Class1 file generated by Visual Studio. (If you have chosen a different project type other than Class Library, then any code file will do.)
  2. Add some XML documentation comments to the class, such as:
    1. (C#) /// <summary>A public class.</summary>
    2. (VB.NET) ''' <summary>A public class.</summary>
  3. Important: Make sure the class is public; otherwise, you'll have to configure the DocProject or DocSite to build help for internal members using the Documentation Scope option. For more information, see How To Configure DocProject.
  4. Save and close the Class1 file.
  5. Configure the new project to create an XML documentation file from the XML documentation code comments.
    1. How to: Generate XML Documentation for a Project
  6. Save the project.

Create a DocProject

Add a new DocProject (or DocSite) to the same solution:
  1. Select File > New > Project...
    1. In the new project dialog expand a language on the left. Currently, DocProject installs templates under Visual C# and Visual Basic only.
    2. Select the DocProject sub-category.
    3. On the right, under My Templates, select either the DocProject or DocSite template. For information about the different types of templates, see DocProject Templates.
    4. Leave the default project name or create your own.
    5. Click OK. The project will be created and the New Project Wizard will start.
  2. Follow the instructions in the New Project Wizard as it will help you to configure your new DocProject or DocSite. For more information, see Configuring Projects with the New Project Wizard.
    1. The first step asks you to choose a build engine. The Sandcastle build engine will do, but if you would like to have automated deployment options then choose Sandcastle/Deployment instead. See Sandcastle Deployment PlugIn for more information.
    2. At the last step of the wizard, select the first project you created and click Finish. If you clicked Finish without selecting any source projects then you can add them as project references in the same way that you would normally add a project reference; e.g., right-mouse click the DocProject or DocSite in Solution Explorer, click Add Reference... and then choose the projects to reference from the Projects tab.
  3. Recommended: Open the solution configuration manager and for each configuration (e.g., Debug and Release) uncheck the Build column for the DocProject so that it's only built on-demand and not when the solution is built.
For help configuring a DocProject, see How To Configure DocProject.
For help building a DocProject, see How To Build Compiled Help With DocProject.


See How to Diagnose And Resolve Issues for help.

Last edited Jun 11, 2008 at 5:51 AM by davedev, version 16


No comments yet.