Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

question from:https://stackoverflow.com/questions/984703/visual-studio-2010-make-and-install-templates

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
205 views
Welcome To Ask or Share your Answers For Others

1 Answer

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%Common7IDEItemTemplates
  • Project Templates - %VSInstallDir%Common7IDEProjectTemplates

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%DocumentsVisual 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...