Just a quick note on add-ins and the VS2005 Project Templates Cache. I have a collection of custom solution templates which i have quite happily been using both directly in Visual Studio as well as through add-ins (programmatically accessing the location of the cached template on disk). One thing i just ran into was the issue that when i installed GAT and GAX (Feb 07 CTP), the entire cache disappeared. (it could also have something to do with installing Resharper 3.0 – but i doubt it cos i have come across a couple of posts where people have had all the standard and custom templates disappear after installing the WinFX extensions -at least mine didnt disappear – they just couldnt be accessed programmatically).
Anyway, i tried reinstalling them using the devenv /installvstemplates command but that didnt work either. Those of you who have created add-ins would recall that the cache is in the Environment.SpecialFolders.ApplicationData folder and the installvstemplates command usually rebuilds that folder. When i ran the add-in VS just complained helpfully that “the index did not fall within the range” :-).
It appears that the solution/workaround to this issue is to do the installvstemplates as above, then open VS and add a new project/solution making use of your custom template (but dont do this via the add-in – just use the regular menu options of the IDE). This seems to kick-start VS into life and the ProjectTemplatesCache folder gets rebuilt nicely and the add-in should start to work.
I have no idea why this happened, but if you get stuck with this issue, hopefully the steps above will help you.