none
Deploying .vsz files in VS2010. RRS feed

  • Question

  • I have a VSPackage with a custom project type and associated project template (+wizard) deployed using a .vstemplate file.  When debugging the project system, these, of course, are deployed to the 10.0Exp experiemental instance.  I have some C++ project templates (that use the old-style .vsz wizards) that need to appear under the same tree node in the New Project Dialog as the .vstemplate-based projects.  Is there a notion of deploying the .vsz-style wizards to the experiemental instance?  If so, how can I deploy a .vsz-based wizard to appear at a sibling level to my .vstemplate-based wizards?  It seems "wrong" that when debugging my .vsz-style wizard on my development machine I must register its location in the "real" registry hive under the following:

    HKLM\Software\Wow6432Node\VisualStudio\10.0\NewProjectTemplates\TemplateDirs\{MyCustomProjectGuid}\

    Thanks in advance.

    Tuesday, August 14, 2012 8:25 PM

Answers

  • Try these below:

    Create  VSDIRs and then place the VSDIRs and .vsz’s  in the folder pointed to by this location:

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Exp_Config\Projects\{<project-factory-Guid>}\ProjectTemplatesDir (I believe that this node is created when they register the Project Template)

    Include a pkgdef file to define those registration entries which would only be merged in the Exp hive. This would avoid having to register in HKLM\...\10.0.

    Tuesday, August 28, 2012 5:09 AM

All replies

  • To deploy your custom project type, you don't need .vsz files any more. We can use .zip files which contain .vstemplate file and the template file.

    Also you can read the reference as following below:

    http://msdn.microsoft.com/en-us/library/cc512961.aspx

    Wednesday, August 15, 2012 7:45 AM
  • Thanks for your reply.  However, the issue I'm having is with C++ projects, and these are not supported by .vstemplate files in Dev10 and earlier, unless I'm mistaken.  I have C# project templates as well; thus, the need to "mix" the two templating schemes and have them appear under the same tree node in the New Project Dialog.

    Wednesday, August 15, 2012 3:23 PM
  • I'm sure Dev10 supports .vstemplate files.

    We can define the templates in VSPackage as the link said like:

    public ProvideProjectFactoryAttribute(Type factoryType, string name, string displayProjectFileExtensionsResourceID, string defaultProjectExtension, string possibleProjectExtensions, string projectTemplatesDirectory)

    Thursday, August 16, 2012 8:51 AM
  • Once again, .vstemplates are NOT supported in Dev10 for C++ projects.  Please see the big yellow note at the top of the following link:

    http://msdn.microsoft.com/en-us/library/6db0hwky(v=vs.100).aspx

    Thursday, August 16, 2012 1:49 PM
  • Hi Pacific,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
     
    Thank you for your understanding and support.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Monday, August 20, 2012 5:50 AM
    Moderator
  • Thanks Ego.  I appreciate that.  I think it would be quite helpful, as there seems to be a fair amount of confusion on this particular issue.
    Monday, August 20, 2012 7:18 PM
  • Hi Pacific,

    Instead of put the vsz template to

    HKLM\Software\Wow6432Node\VisualStudio\10.0\NewProjectTemplates\TemplateDirs\{MyCustomProjectGuid}\

    Please try to install them to

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Projects\{MyCustomProjectGuid}\

    More info
    http://msdn.microsoft.com/en-us/library/aa730846.aspx


    Continuous Value Delivery

    Tuesday, August 21, 2012 1:47 AM
  • Hello Rong-Chun,

    Thanks for your reply.  But, manually putting this info in the registry in order to debug my wizard is the part that does not seem correct if all I'm trying to do is debug in the experimental instance.  The registry location I listed in my original email DOES work, so it's not really a matter of where in the registry.  I know for a deployed machine I need to list these templates in the registry.

    What I'm asking about specifically is something akin to the mechanism for debugging .vstemplate-based wizards.  With those types of wizards, when you debug, the zip files containing the templates are deployed to the experimental instance:

    [AppData]\Microsoft\VisualStudio\10.0Exp\Extensions\Company\Product\Version\ProjectTemplates

    In this way, the normal instance of VS is unaffected by wizards you are developing and debugging.  If you simply copy .vsz-based wizard files in the above folder, the experimental instance of VS does not pick them up. I'm looking for a way to deploy and debug .vsz-based wizards similarly to the way .vstemplates are debugged. Modifying the Dev10 registry hive affects the normal instance of VS and just seems "wrong" to me.

    Saturday, August 25, 2012 12:10 AM
  • Try these below:

    Create  VSDIRs and then place the VSDIRs and .vsz’s  in the folder pointed to by this location:

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Exp_Config\Projects\{<project-factory-Guid>}\ProjectTemplatesDir (I believe that this node is created when they register the Project Template)

    Include a pkgdef file to define those registration entries which would only be merged in the Exp hive. This would avoid having to register in HKLM\...\10.0.

    Tuesday, August 28, 2012 5:09 AM
  • Hi Disley,

    Thanks for your reply.  It's true that the following is created when the package is deployed to the experimental instance:

    HKCU\Software\Microsoft\VisualStudio\10.0Exp_Config\Projects\{MyGuid}\ProjectTemplatesDir

    And, VS does display all of my templates that use .vstemplate style templates.  But, placing the old-style .vsz-style templates in that folder doesn't seem to work.

    Sunday, October 28, 2012 3:33 PM