Install Visual Studio Template RRS feed

  • Question

  • Hello.


    I created a Visual Studio Project Template and Wizard assembly, and am creating a deployment project for the components.  The Wizard assembly installs fine in the GAC, and the Project Zip will install in the default Template folder (Documents\Visual Studio 2005\Templates\ProjectTemplates).


    I am looking for a way to set the install location of the Template to the user's template location.  In other words, how can I get the location from the registry and set the install location to that reg value?

    Saturday, July 21, 2007 6:29 PM



    Hi, Andre Rade,


    Of couse, we can get that information from registry.

    But first, please read the following article.




    And you can see that the installed templates locate in

  • <VisualStudioInstallDir>\Common7\IDE\ItemTemplates\Language\Locale\

  • <VisualStudioInstallDir>\Common7\IDE\ProjectTemplates\Language\Locale\


    The Custom Templates are in

  • My Documents\Visual Studio 2005\Templates\ProjectTemplates\Language\
  • My Documents\Visual Studio 2005\Templates\ItemTemplates\Language\


    For the installed template, you can read the Registry at


    and the value could be like "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\".

    All you have to do is to add the template path.


    And for the Custom Templates

    You can use "Environment.SpecialFolder.MyDocuments.ToString()" to get the "My Documents" folder path,

    and then add the template path.


    Hopes this helps,


Thursday, July 26, 2007 3:36 AM