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
templates, see DocProject Templates
Create a Solution and Source Project
- Run Visual Studio 2005 or 2008.
- Any edition may be used, including Visual C# Express or Visual Basic Express.
- In the empty environment, without any solution loaded, create a new project:
- Select File > New > Project...
- 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.
- Select a project type on the right. For this tutorial choose Class Library, although any will do.
- Note: Do not select one of the DocProject templates now.
- Enter any name that you'd like for the new project.
- Click OK.
- Save the solution.
Configure the Source Project
- 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.)
- Add some XML documentation comments to the class, such as:
- (C#) /// <summary>A public class.</summary>
- (VB.NET) ''' <summary>A public class.</summary>
- 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.
- Save and close the Class1 file.
- Configure the new project to create an XML documentation file from the XML documentation code comments.
- How to: Generate XML Documentation for a Project
- Save the project.
Create a DocProject
Add a new DocProject
) to the same solution:
- Select File > New > Project...
- In the new project dialog expand a language on the left. Currently, DocProject installs templates under Visual C# and Visual Basic only.
- Select the DocProject sub-category.
- On the right, under My Templates, select either the DocProject or DocSite template. For information about the different types of templates, see DocProject Templates.
- Leave the default project name or create your own.
- Click OK. The project will be created and the New Project Wizard will start.
- 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.
- 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.
- 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.
- 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