views:

9

answers:

1

Is there a way from within a Visual Studio Add-in to get visual studio to rebuild its cache in a similar way to calling DevEnv.exe with the /InstallVSTemplates command?

A: 

I havent found a way to instruct the cache to be rebuilt directly but calling DTE2.GetProjectItemTemplate(releativeLocation, projectLanguage) to get the cached location of a custom template does seem to cause the cache to be rebuilt.

As I effectively wanted this so that Visual Studio detected any new custom templates that were added before trying to add use the programmatically this is good enough for my needs. As a side note the cache is refreshed when the AddNewItem or AddNewProject dialog is also launched. I did get caught out initially as I had the cache open in an explorer window and this was preventing the cache from being rebuilt.

gouldos