none
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

Answers

  •  

    Hi, Andre Rade,

     

    Of couse, we can get that information from registry.

    But first, please read the following article.

    http://msdn2.microsoft.com/en-us/library/y3kkate1(VS.80).aspx

     

     

    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

    "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\InstallDir"

    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,

    Regards

Thursday, July 26, 2007 3:36 AM