VS C++ project templates

I really want to learn how to make a project template for c++. That way I dont have to waste time editing my project properties adding some library and includes everytime I create a new project.

A template like this https://marketplace.visualstudio.com/items?itemName=JonnyPaton.SFMLTemplateproject
Any simple tutorials out there? been searching for a while. MSDN page is terrible. PLease? thanks
Last edited on
Hello skadush,

I have Visual Studio 2015 and have not done this before, but I am willing to learn with you.

My initial research was with the help program in VS. Under the index tab I entered "project template" which has instructions of how to create a template. It looks fairly straight forward.

After creating an initial project undef the file tab choose "export template" and follow the directions. You may first have to make some changes to the original project before creating the template like using "$safeprojectname$" where the file name is used in the code.

You may find these links helpful:
https://www.google.com/#safe=strict&q=visual+studio+2015+create+project+template
https://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx
http://www.dotnetcurry.com/visualstudio/1243/create-project-template-visual-studio-2013-2015

I have not read through all of these yet, but the third link looks promising.

I have not tried this yet, but will shortly.

Hope that helps,

Andy
Hello. Can you give me me a very simple source for changing the name? Like for example printing "Hello world". Making it a template project? Check the links. the last one is c# :(


Thank you
Last edited on
Hello skadush,

Sorry about the search links. I did not find out till later that most covered C#. Although I made several attempts yesterday all did not work the way I was expecting.

The Microsoft information I read refereed to making changes to files with extensions ".vsix", ".vstemplate" and there might one or two others. I will work on those today and see what happens.

Before I started working these templates I adjusted this file: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCWizards\AppWiz\Generic\Application\templates\1033\root.cpp after first making a backup copy. Now every time I use the New Project app wizard and choose "Win32 console app" I get the code for the main function with everything I need to get started. Now I can see that creating a new template would be useful.

Sorry not much help yet,

Andy
Topic archived. No new replies allowed.