locked
SDK Package: How to deploy custom options page? RRS feed

  • Question

  • I plan to customize this example: VSSDK IDE Sample: Options Page (http://code.msdn.microsoft.com/VSSDK-IDE-Sample-Options-f152f574.)

    How do I deploy my new tools options page?

    I am using VS2010 for development, and plan to deploy to VS2010 and VS2012. (I have created many macros over the years but am new to packages. I plan to read the options from an addin.)

    Regards,

    Frank


    Frank

    Saturday, January 5, 2013 6:24 PM

Answers

  • The sample shows them in the context of a package, that is how they are deployed and installed. Your package ends up generating registry information (a pkgdef file) during build time, based on the attributes you place on the Package class. That file is merged into VS registry hive when the VSIX that the project produces is installed (by double clicking on it on an end user machine, during development it is auto-deployed to the experimental instance, which is what launches when you press F5 from a package project). It isn't clear why you would be using an AddIn over a package, there may be some way to add ToolsOptions pages from an AddIn (say via DTE), but if you are making a package it makes more sense to put all your functionality in that, instead of having an AddIn and a package (AddIns also can't be deployed via VSIX).

    Ryan

    • Marked as answer by OldGrouch Saturday, January 5, 2013 10:16 PM
    Saturday, January 5, 2013 9:34 PM

All replies

  • The sample shows them in the context of a package, that is how they are deployed and installed. Your package ends up generating registry information (a pkgdef file) during build time, based on the attributes you place on the Package class. That file is merged into VS registry hive when the VSIX that the project produces is installed (by double clicking on it on an end user machine, during development it is auto-deployed to the experimental instance, which is what launches when you press F5 from a package project). It isn't clear why you would be using an AddIn over a package, there may be some way to add ToolsOptions pages from an AddIn (say via DTE), but if you are making a package it makes more sense to put all your functionality in that, instead of having an AddIn and a package (AddIns also can't be deployed via VSIX).

    Ryan

    • Marked as answer by OldGrouch Saturday, January 5, 2013 10:16 PM
    Saturday, January 5, 2013 9:34 PM
  • So it looks like the answer is easy. Just use the generated file (OptionsPage.vsix) to deploy the extension.

    (By the way, I created my AddIn first, using my VB macro code, so that I could use my "macros" from VS2012. Maybe my next enhancement will be moving these to the package.)

    Thanks for your help.


    Frank

    Saturday, January 5, 2013 10:16 PM
  • Ryan,

    In my AddIn, I have code that adds named commands (about a dozen) that invoke VB code that is very similar to my original VB macros. (I then use Visual Studio IDE itself to create a custom toolbar with some of these commands.) (A simple example is a command that adds a date-stamp to the current document.)

    Can you point me to a sample that shows how to add named commands in a package? Would I have to make many changes to my VB AddIn routines that implement the command actions (to run inside a package)?

    Regards,


    Frank

    Friday, January 18, 2013 3:08 AM