I have a managed package that I have created for Visual Studio 2012. I created several project and several item templates for the package. I want to unit test my project templates. Everything I see points to using Solution2.GetProjectTemplate() to get the path to the .vstemplate to add my new project within the unit test. No matter what values I pass to the Solution2.GetProjectTemplate(), it always throws a FileNotFoundException.
The VISX successfully deploys the templates to the experimental hive. The templates are in:
%localappdata%/Microsoft/VisualStudio/11.0Exp/Extensions/MyCompany/MyExtension/1.0/ProjectTemplates/CSharp/OutputSubPath/LocaleID/
The template cache seems to have extracted the templates to:
%localappdata%/Microsoft/VisualStudio/11.0Exp/VTC/RandomGuid/~PC/ProjectTemplates/CSharp/OutputSubPath/LocaleID/
1) I would like to be able to use the Solution2/4.GetProjectTemplate() method to locate .vstemplate for my templates for both unit testing and for use within my package as well.
2) If that is not possible, how can I determine the install location of my package/template that was installed through the VISX?
3) Is it possible to programmatically determine the cache path to where the templates were extracted? The RandomGuid folder beneath the VTC folder isn't part of my VISX or any part of my package. It seems like a random GUID was chosen for the folder name. It also is not found within the registry.
I'm sure someone has run into this before, but I can't find anything searching through Bing, Google, or this forum. It's probably a matter of knowing the correct text to search.