locked
load addin when visual studio open solution RRS feed

  • Question

  • Hi all,

    I want to load my addin after VS load a solution file. Then I tried to do this:

    In the OnConnection() method, seems like the ext_ConnectMode.ext_cm_Solution never fires. I've tried to show a message box contains connectMode.toString, but only ext_ConnectMode.ext_cm_UISetup is fired.


    Anyone can help me?


    Thanks,
    FK
    Thursday, March 27, 2008 2:08 AM

Answers

  • VS can load an add-in specific to a solution ("Solution add-ins") or an add-in for all solutions ("Visual Studio add-ins"), but there is no mechanism to load an add-in after loading any solution. So:

     

    - To create an add-in specific to a solution file, see:

     

    How to: Create Solution Add-ins 

    http://msdn2.microsoft.com/en-us/library/ms165621(VS.80).aspx

     

    - To do something after any solution is loaded, make your add-in always loaded (load onstartup) and subcribe to the EnvDTE.SolutionEvents.Opened event.

     

    Thursday, March 27, 2008 12:11 PM

All replies

  • VS can load an add-in specific to a solution ("Solution add-ins") or an add-in for all solutions ("Visual Studio add-ins"), but there is no mechanism to load an add-in after loading any solution. So:

     

    - To create an add-in specific to a solution file, see:

     

    How to: Create Solution Add-ins 

    http://msdn2.microsoft.com/en-us/library/ms165621(VS.80).aspx

     

    - To do something after any solution is loaded, make your add-in always loaded (load onstartup) and subcribe to the EnvDTE.SolutionEvents.Opened event.

     

    Thursday, March 27, 2008 12:11 PM
  • This is possible with a VSIP package, though, by giving your package the [ProvideAutoLoad(UIContextGuids.SolutionExists)] attribute.
    Friday, March 28, 2008 12:40 PM