4

I'm migrating VS2015 project templates to VS2017.

There are my own templates under

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\CSharp

After adding a new project template or modifying existing files it is possible to refresh cache by running below command in VS2015.

devenv /installvstemplates

But in VS2017 this command does not work.

i found a workaround by deleting cache.bin file under %localappdata%\Microsoft\VisualStudio\15.0_9f589482\ProjectTemplatesCache_{00000000-0000-0000-0000-000000000000}

i need to do refresh cache programmatically but this workaround did not seemed so reliable for me. It includes some strange folder names which might vary on different systems.

Is there any alternative command line switch similar to devenv /installvstemplates for VS2017 or any other proper way to refresh template cache?

tutalia
  • 285
  • 3
  • 16
  • Wondering myself, but one thing that may be confusing is: If you export a template from VS, the zip is stored and shown in `Documents\Visual Studio 2017\My Exported Templates`. That is not where it is loaded from though. Instead a copy of the zip is placed in `Documents\Visual Studio 2017\Templates\ItemTemplates`. I closed VS, updated the zip there, ran `devenv /InstallVSTemplates` for good measure and then VS used the new version of the template. – Jens Jan 08 '19 at 12:50

0 Answers0