Templates.inf File

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at 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.

Example

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.

Example

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

See The JScript File for more information.

See Also

Files Created for Your Wizard
Custom Wizard
Creating a Custom Wizard
Designing a Wizard