Windows template problem


I'm trying to create a template file for my OpenGL projects so I don't have to
create them every time. I have created a template:

<VSTemplate Version="3.0.0" xmlns="" Type="Project">
<Description>OpenGL template</Description>
<Project TargetFileName="OpenGL1.vcxproj" File="OpenGL1.vcxproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="OpenGL1.vcxproj.filters">OpenGL1.vcxproj.filters</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="main.cpp">main.cpp</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="vgl.h">vgl.h</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="LoadShaders.h">LoadShaders.h</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="LoadShaders.cpp">LoadShaders.cpp</ProjectItem>

Now I want to be able to put each file in its respective folder, so .cpp files go into the 'Source files' folder and so on. When I create a project based on this template there are no folder names. So no 'Header Files', no 'Source files'.

Can anyone help please ?


I need to edit the template file.

I change all the ReplaceParameters to a value of false

e.g. <ProjectItem ReplaceParameters="false" TargetFileName="main.cpp">main.cpp</ProjectItem>

Then I create a folder in the templates folder which I think is located in C:\users\USERNAME\Documents\Visual Studio 17\Templates\ProjectTemplates\VC and store the template in this folder and hey presto! the template works.

Topic archived. No new replies allowed.