locked
VS2008 SP1 - VSShell + VsPackage Bypass Experimental Hive registration RRS feed

  • Question

  • Is there a way I can bypass the experimental hive registration for my VSPackages? 

    I have a Solution with a VSShell project, with about 18 VSPackages.  Every time I build, it registers into the experimental hive, even though when the VSShell executable runs, it doesn't actually use the experimental hive, I've got it running under it's own hive.  I believe the VSShell sets up the packages because of the Shell Dependency settings, at the end of the build.

    It takes quite a while to perform the registration for some of the packages (the MPF package for example), so I'm just trying to find a way to improve things.


    Thursday, May 19, 2011 5:25 PM

Answers

  • Hi FBNitro,

     

    Thanks for your post.

    As far as I know, there is no options to stop registering to experimental hive.

    MSBuild register VSpackage to experimental hive in Microsoft.VsSDK.targets,

    you can find a target

    Target Name="VsTemplatePathsTarget"
              DependsOnTargets="$(VsTemplatePathsTargetDependsOn)"
              Condition="'$(DeployVSTemplates)'=='true'">

        <VsTemplatePaths RegistryHive="$(VSSDKTargetPlatformRegRoot)$(VSSDKTargetPlatformRegRootSuffix)">
          <Output TaskParameter="ProjectTemplates" PropertyName="ZipProjectOutput"/>
          <Output TaskParameter="ItemTemplates" PropertyName="ZipItemOutput"/>
        </VsTemplatePaths>

        <!--Make sure those directories exist-->
        <MakeDir Directories="$(ZipProjectOutput);$(ZipItemOutput)"/>
      </Target>

    in the targets file.

    The best approach I know is to modify the targets file to avoid registration.

    Hope my reply helps.


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Victor_Chen Tuesday, May 31, 2011 7:45 AM
    Friday, May 20, 2011 5:02 AM
  • Helps to know what version of VS you're targeting here. With VS2008, I believe this was just a property set in the .csproj file.

    With 2010 things are a bit different as described in the following blog. I'm pretty certain there are properties you can define like the DeployExtension property that give you some additional control over the registration. I haven't tried this, but you'll want to examine the Microsoft.VsSDK.targets to see if there's a property that'll meet your needs.

    http://blogs.msdn.com/b/dsvst/archive/2010/03/01/dissecting-vs-2010-package-registration.aspx

    Sincerely,


    Ed Dore
    • Marked as answer by Victor_Chen Tuesday, May 31, 2011 7:45 AM
    Saturday, May 28, 2011 5:53 AM
  • Alright, that seems to have worked.  Thanks guys.

    I set these to false in all my VsPackages:

        <RegisterOutputPackage>true</RegisterOutputPackage>
        <RegisterWithCodebase>true</RegisterWithCodebase>

    It cut 3 minutes off my Rebuild All time.  Down from 16:25 to 13:30.  Now to find more things I can do without moving the clear case host from another country to my desk.

    • Marked as answer by FBNitro Thursday, June 2, 2011 5:48 PM
    Thursday, June 2, 2011 5:47 PM

All replies

  • Hi FBNitro,

     

    Thanks for your post.

    As far as I know, there is no options to stop registering to experimental hive.

    MSBuild register VSpackage to experimental hive in Microsoft.VsSDK.targets,

    you can find a target

    Target Name="VsTemplatePathsTarget"
              DependsOnTargets="$(VsTemplatePathsTargetDependsOn)"
              Condition="'$(DeployVSTemplates)'=='true'">

        <VsTemplatePaths RegistryHive="$(VSSDKTargetPlatformRegRoot)$(VSSDKTargetPlatformRegRootSuffix)">
          <Output TaskParameter="ProjectTemplates" PropertyName="ZipProjectOutput"/>
          <Output TaskParameter="ItemTemplates" PropertyName="ZipItemOutput"/>
        </VsTemplatePaths>

        <!--Make sure those directories exist-->
        <MakeDir Directories="$(ZipProjectOutput);$(ZipItemOutput)"/>
      </Target>

    in the targets file.

    The best approach I know is to modify the targets file to avoid registration.

    Hope my reply helps.


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Victor_Chen Tuesday, May 31, 2011 7:45 AM
    Friday, May 20, 2011 5:02 AM
  • Hi again,

     

    Is it resolved?


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 27, 2011 9:18 AM
  • Helps to know what version of VS you're targeting here. With VS2008, I believe this was just a property set in the .csproj file.

    With 2010 things are a bit different as described in the following blog. I'm pretty certain there are properties you can define like the DeployExtension property that give you some additional control over the registration. I haven't tried this, but you'll want to examine the Microsoft.VsSDK.targets to see if there's a property that'll meet your needs.

    http://blogs.msdn.com/b/dsvst/archive/2010/03/01/dissecting-vs-2010-package-registration.aspx

    Sincerely,


    Ed Dore
    • Marked as answer by Victor_Chen Tuesday, May 31, 2011 7:45 AM
    Saturday, May 28, 2011 5:53 AM
  • I'm on VS2008 SP1.  I'll play around with the settings and post back once I figure things out.  Ed, I assume these are the settings you're talking about:

      <PropertyGroup>
        <!--
        To specify a different registry root to register your package, uncomment the TargetRegistryRoot
        tag and specify a registry root in it.
        <TargetRegistryRoot></TargetRegistryRoot>
        -->
        <RegisterOutputPackage>true</RegisterOutputPackage>
        <RegisterWithCodebase>true</RegisterWithCodebase>
      </PropertyGroup>

     

    Glancing at Ed's blog post, it sounds like when I move to 2010, this won't be a concern.

    Tuesday, May 31, 2011 4:13 PM
  • Alright, that seems to have worked.  Thanks guys.

    I set these to false in all my VsPackages:

        <RegisterOutputPackage>true</RegisterOutputPackage>
        <RegisterWithCodebase>true</RegisterWithCodebase>

    It cut 3 minutes off my Rebuild All time.  Down from 16:25 to 13:30.  Now to find more things I can do without moving the clear case host from another country to my desk.

    • Marked as answer by FBNitro Thursday, June 2, 2011 5:48 PM
    Thursday, June 2, 2011 5:47 PM