Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 Make and Install Templates

I am using F# and i found that the available templates were a bit to sparse for my liking, and i want to make more. How would i go about doing that? also, how would i install these templates after I've made them?

like image 803
RCIX Avatar asked Jun 12 '09 02:06

RCIX


People also ask

How do I add a template to Visual Studio 2010?

To do so: Open Visual Studio IDE>>Tools>>Options>>Projects and Solutions>>General>>Change “User project templates location” to My Templates folder. You also can export settings of Visual Studio on first server via Tools>>Import and Export Settings…>> Export selected environment settings.

How do I create a custom template in Visual Studio?

On the Project menu, choose Export Template. The Export Template Wizard opens. On the Choose Template Type page, select Project Template. Select the project you want to export to a template, and then choose Next.

How do I add a template to Visual Studio?

The default location is %USERPROFILE%\Documents\Visual Studio <version>\Templates\ItemTemplates. Close Visual Studio and then reopen it. Create a new project, or open an existing project, and then choose Project > Add New Item or press Ctrl+Shift+A. The item template appears in the Add New Item dialog box.

Where do I put Visual Studio templates?

Installed templates By default, templates installed with Visual Studio are located in: %ProgramFiles(x86)%\Microsoft Visual Studio\2019\<edition>\Common7\IDE\ProjectTemplates\<Language>\<Locale ID>


1 Answers

In Visual Studio's path you will find the default templates, these are a set of zip files that get expanded into the template cach.

They are stored in

  • Item Templates - %VSInstallDir%\Common7\IDE\ItemTemplates\
  • Project Templates - %VSInstallDir%\Common7\IDE\ProjectTemplates\

Extracting the {{.zip}} in question and recompressing with the modified contents will update the template. You can also copy these files to one of the respective template folders in %USERPROFILE%\Documents\Visual Studio 2010.

For information on building templates have a look at Visual Studio Templates on MSDN.

You then need to tell VS to rebuild the cache.

  1. Open a visual studio command line shell
  2. Execute devenv /installvstemplates

You can also use the "Export Template..." wizard from the file menu, however the exported template loses original content such as if statements.

like image 106
Brett Ryan Avatar answered Nov 08 '22 13:11

Brett Ryan