Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 - Export (Project) Template menu option grayed out

In Visual Studio, I want to make a simple C++ project and export it out as a template, so I can use the template to start new projects to save me time. But the Export Template menu option is always grayed out. I've not once been able to click it.

Anyone know why? Anyone know how to accomplish what I need (besides the obvious "make a copy of an existing project in explorer")?

It seems like project templates should be a no-brainer feature for VS.

This seems to be the case for Visual Studio 2005, 2010 (I probably 2008 as well I haven't checked).

like image 200
Jake Wilson Avatar asked Apr 30 '10 05:04

Jake Wilson


3 Answers

You can use the Visual C++ wizard architecture, which is designed for easy extensibility and customization. You can create a wizard using the Visual C++ Custom Wizard. After you create your wizard, you can configure it to generate the starter files you need for your projects.

For more information how to do this please refer to the following location: http://msdn.microsoft.com/en-us/library/bhceedxx(v=VS.80).aspx

Noticed that normal project template and VC++ project template are different

Let me know if you have any problems...

s

like image 78
BALKANGraph Avatar answered Oct 06 '22 21:10

BALKANGraph


Anyone know how to accomplish what I need (besides the obvious "make a copy of an existing project in explorer")?

Don't just make a copy in explorer! Your project file will contain the same project GUID as the one you copied from. This may not immediately or ever become a problem but there are situations where you will have strange bugs. This occurs mostly (or only?) when you have multiple projects with the same GUID in the same solution. If you must, use the GUID generator to create a new unique GUID for the new project.

See also Detecting Projects with Duplicate GUIDS.

like image 3
Joris Timmermans Avatar answered Oct 06 '22 23:10

Joris Timmermans


I didn't know about the Export Template feature, also by me it isn't grayed out in C# project, but there another solution, called Solution Factory.

http://solutionfactory.codeplex.com/

But I really need to test that Export Template feature.

like image 1
Fitzchak Yitzchaki Avatar answered Oct 06 '22 23:10

Fitzchak Yitzchaki