Export (0) Print
Expand All

Templates.inf File

Templates.inf is a text file that contains a list of templates to render for the project.

Because Templates.inf is a template file itself, you can use directives to indicate which files to include in a project, depending on a user's selections. See Template Directives for a list of directives that you can use in this file.

Template1.txt
Template2.txt
  [!if TYPE_A]
TemplateOptionA.h
TemplateOptionA.cpp
  [!else]
TemplateOptionB.h
TemplateOptionB.cpp
  [!endif]

CreateCustomInfFile renders Templates.inf into a temporary text file, which must then be deleted after processing the files.

var InfFile = CreateCustomInfFile();
AddFilesToProject(selProj, strProjectName, InfFile);
InfFile.Delete();

See The JScript File for more information.

Community Additions

ADD
Show:
© 2014 Microsoft