locked
Refresh ProjectTemplatesCache for VS2012 RRS feed

  • Question

  • Hi,

    I am trying to add custom project template and copy it into C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates with installer.  The problems is the template does not appear, and the reason is that there is a ProjectTemplatesCache.  I tried to copy my template to ProjectTemplatesCache as well, but it doesnot work.  After I delete the ProjectTemplatesCache, my new template appears.

    Could you please clarify how the cache works? and how can I refresh/recreate the template cache programmatically ?  Or is there a way in setup projects to refresh the cache? I am using setup project of VS2010.

    Regards,

    Daniel 

    Monday, October 29, 2012 2:11 AM

Answers

  • Devenv /setup is the right thing to do in installer, even when installing templates. /installvstemplates is available only for development purposes, as it incurs performance penalty in regular execution.

    http://blogs.msdn.com/saurabhjain

    Monday, October 29, 2012 5:40 AM

All replies

  • Hi Daniel,

    Just run devenv /installvstemplates from an elevated command prompt, and that should work. If you install via VSIX, you don't have to do this step, but for templates installed via your own installer, you typically have to run devenv /setup  (or if you're just installing templates use /installvstemplates) as the /setup switch will take longer as it also remerges menu resources for all the various packages.

    Sincerely,


    Ed Dore

    Monday, October 29, 2012 4:33 AM
  • Devenv /setup is the right thing to do in installer, even when installing templates. /installvstemplates is available only for development purposes, as it incurs performance penalty in regular execution.

    http://blogs.msdn.com/saurabhjain

    Monday, October 29, 2012 5:40 AM