VS 2011 Beta WinForms Toolbox Control Registration Does Not Work

Unanswered VS 2011 Beta WinForms Toolbox Control Registration Does Not Work

  • Friday, May 11, 2012 3:27 AM
     
      Has Code

    Hi Everyone,

    We have set of WinForms controls that we used to register via Registry Entry

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\{version}\ToolboxControlsInstaller

    in VS.NET 2010. This method no longer works in VS.NET 11 Beta.

    I am aware of information available here: http://msdn.microsoft.com/en-us/library/bb166364%28v=vs.110%29

    None of that covers the case of existing control assemblies and all information I've seen there says that you must have VSPackage to get controls appear in toolbox. This seems like huge complication given the way it used to work in VS.NET 2010.

    So, how to add the existing WinForms control assemblies to Toolbox without going through VSPackage?

All Replies

  • Monday, May 14, 2012 9:32 AM
    Moderator
     
     

    Hi,

    There's no such registry key in VS 11 beta anymore. To deploy these controls, VS 2010 SDK provides a project template to create controls that can be deployed automatically.  Please refer to: How to: Create a Toolbox Control That Uses Windows Forms

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

  • Monday, May 14, 2012 5:39 PM
     
     

    Unfortunately that does not help for our usage case. What you posted there would be fine for new controls being created, but what about existing controls? We would like to stay away from VSPackage since that is not how we deploy controls.

    So question again is how to register into the Toolbox existing WinForms controls that were developed long ago. We simply want to include code necessary into our existing installer so controls appear in Toolbox. Why is this changed and/or broken with each new VS.NET release?

  • Monday, May 14, 2012 9:46 PM
     
     

    That registry location will still work, although it's recommended that you use a .pkgdef file instead of writing to the registry.  If you do modify the VS HKLM registry, you must run "devenv /setup" from your installer in order for VS to "notice" the update.

    -Josh Stevens

    VS Shell team

  • Tuesday, May 15, 2012 2:32 AM
     
     
    Josh, thank you very much, I will try that tomorrow, do you have link which explains how to use pkgdef file?
  • Tuesday, May 15, 2012 1:40 PM
     
     

    http://blogs.msdn.com/b/visualstudio/archive/2009/12/18/what-s-a-pkgdef-and-why.aspx is a good introductory article.  You can put the pkgdef file under <VS install folder>\Common7\IDE\Extensions instead of modifying HKLM.  (You'll still need to run devenv /setup as well.)

    -Josh Stevens

    VS Shell team