programmatically load/register a project template from within a package RRS feed

  • Question

  • hi all,

    i am currently working on a vnext of my nunit extension for asp.net mvc.  it should support asp.net mvc 3 & 4 as well as visual studio 2010 and 2012. most of that is not hard to implement and i am nearly done. but i am struggling at one single point:

    asp.net mvc 4 is build upon nuget (WizardData) and uses the registry as locator of the assemblies. the problem is that it uses different registry keys as for vs2010 and vs2012. which actually means i have to deploy two sets of project templates depending on the vs-version.

    as one is not able to have parameters inside the pkgdef files (which could fetch the templates depending on the version by adding it to the registry) i thought about having a VSPackage as bootstrapper and load the corresponding templates depending on the extracted version from DTE.

    is there any chance to register a project template from with the initialize function in the package? 

    one solution - i know - would be to have 2 separate extensions for both of the visual studio versions. but this should be my last possible solution while i don't want to maintain two sets of the extension.

    thanks for any help,

    Monday, December 10, 2012 4:18 PM


All replies