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?
views:
9answers:
1
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
2010-10-22 08:39:29