+1  A: 

'export template' does not work for C++ projects. If you want templates for them, you need to create it yourself: see my answer here. It involves some work, but if you use this kind of projects a lot, the work is well-spent time.

edit

I looked up my code, something like this should get you started; the onFinish method in default.js gets called after clicking 'Ok' in the default wizards. Note that I did not test this!

function onFinish( selProj, selObj )
{
  var strProjectPath = wizard.FindSymbol('PROJECT_PATH');
  var prjCpp;
  var prjCs;
  CreateProjects( strProjectPath, prjCpp, prjCs );
  //project config here
  prjCpp.Object.Save();
  prjCs.Object.Save();
  selProj = prjCpp;
}

function CreateProjects( path, prjCpp, prjCs )
{
  var strProjTemplatePath = wizard.FindSymbol('ABSOLUTE_PATH'); //get template from our template dir
  var strProjTemplateCpp = strProjTemplatePath + '\\default.vcproj';
  var strProjTemplateCs = strProjTemplatePath + '\\default.csproj';
  var Solution = dte.Solution;

  if( wizard.FindSymbol( "CLOSE_SOLUTION" ) )
  {
    Solution.Close();
    strSolutionName = wizard.FindSymbol( "VS_SOLUTION_NAME" );
    if( strSolutionName.length )
    {
      var strSolutionPath = strProjectPath.substr( 0, strProjectPath.length - strProjectName.length );
      Solution.Create(strSolutionPath, strSolutionName);
    }
  }

  var oTarget = wizard.FindSymbol( "TARGET" );
  prjCpp = oTarget.AddFromTemplate( strProjTemplateCpp, strProjectPath, strProjectName + '.vcproj' );
  prjCs = oTarget.AddFromTemplate( strProjTemplateCs, strProjectPath, strProjectName + '.csproj' );
  Solution.Projects.Add( prjCpp );
  Solution.Projects.Add( prjCs );
}
stijn
Hmm, I see. Can these be bundled with a C# template? I'd like to have both a C# project and a C++ project created at the same time in the same solution.
Daniel15
I didn't try that myself, but it is definatly possible: since creating the solution, the project, modifying it's content etc all happens in js scripts, it's not too hard to create 2 projects instead of one for the solution.
stijn
Alright, thanks for that :) I can't seem to get any code working. I created a new wizard via New Project -> Visual C++ -> Custom Wizard, pasted the code into default.js, opened a new instance of Visual Studio, and tried using the wizard in the new instance. Even something simple like an alert('Hello World') isn't working in OnFinish, so I think I'm doing something wrong. I'll read more documentation and try figure this out. Thanks for your help :)
Daniel15
Hm, it looks like it might be possible to make a C++ template with a ".vstemplate" file, unlike what we previously thought. Looks like WiX uses it: http://blogs.msdn.com/jasongin/archive/2008/05/23/custom-action-project-templates.aspx. Hmm, might have to try this
Daniel15
+1  A: 

I found the answer myself a while ago, and forgot to properly update this. A .vstemplate file can use C++ by setting the language to CSharp (it still works correctly).

Here is an example I've used: .vstemplate file and all other files

WiX also uses this method

Daniel15