How to: Create a Project Template Using the Projectgen.exe Command-Line Tool
You can use the Projectgen.exe command-line tool to create project templates for your host application. Before you can use the Projectgen.exe command-line tool, you must have a project template descriptor file. You can create this file manually, or you can run the Projectgen.exe wizard to automatically generate the descriptor file. For more information, see Walkthrough: Creating a Project Template Using the Project Template Wizard. After you have created the descriptor file, you can use it as an input parameter for the Projectgen.exe command-line tool.
The project template that Projectgen.exe generates contains paths to files based on the file locations on your computer. If end user computers might have different file locations, you must modify the project template so that it uses correct paths. For example, you can replace paths with variables. For more information about variables, see Project Template Generation Tool (Projectgen.exe).
To create a project template
Open the Visual Studio 2008 Command Prompt window. If you are using Windows Vista as your operating system, start the Visual Studio 2008 Command Prompt window by using the Run as Administrator option.
Change to the following directory:
%ProgramFiles%\Visual Studio Tools for Applications 2.0 SDK\build number\Visual Studio Tools For Applications\Tools\ProjectGen
This path assumes that you installed the Microsoft Visual Studio Tools for Applications 2.0 SDK to the default directory.
Type the following command and then press ENTER:
projectgen.exe /i:%SYSTEMDRIVE%\ShapeAppSamples\ShapeAppCSharp\ProjectDescriptor.xml /o:%SYSTEMDRIVE%\ShapeAppSamples\ShapeAppCSharp\Templates
For information about the command parameters, see Project Template Generation Tool (Projectgen.exe).