How To Build Compiled Help With MSBuild
Building help on the command-line is easy with DocProject. All that you need is DocProject installed on your system, a
DocProject or
DocSite created in Visual Studio and the
MSBuild.exe program.
These instructions can be used to build on the command-line
without Visual Studio installed as well; however,
MSBuild and
DocProject must be installed.
Preparation
First, create a
DocProject or
DocSite. For more information, see
Creating a DocProject for a new solution or
Quick Start: Creating a DocSite.
Next, read
How To Build Compiled Help With DocProject to make sure that you can at least build help within Visual Studio first. It may be easier to troubleshoot issues when they occur inside Visual Studio instead of in a command prompt.
Then run the
Visual Studio Command Prompt. A shortcut is usually located at
Start >
Programs >
Microsoft Visual Studio 2005 >
Visual Studio Tools >
Visual Studio 2005 Command Prompt.
Note: Visual Studio Express users must open a regular command prompt (
Start >
Run >
cmd.exe) and then change the current directory to:
cd %windir%\Microsoft.NET\Framework\v2.0.50727
This is the directory in which the
MSBuild.exe program is installed. The
Visual Studio Command Prompt adds this path to the
Path environment variable so
MSbuild.exe can be executed from the current directory.
Start a build
Enter the following in the command window:
msbuild "{path}\{project}"
where
path is the full path to the
DocProject or
DocSite that you want to build and
project is the
DocProject or
DocSite project file.
For example:
msbuild "C:\projects\test\test.csproj"
The build output that is normally displayed in Visual Studio's
Output window will be displayed in the command prompt as the build proceeds.
Note: If your
DocProject or
DocSite has any
Managed Visual C++ project references then you must build the solution file instead of the project file; e.g.,
c:\projects\test\test.sln