locked
addin loads even though LoadBehavior is off RRS feed

  • Question

  • my addin continues to load even though LoadBehavior and  Commandpreload are both set to "0". Addin manager shows the addin as unchecked. I restart visual studio. The addin loads.  I reboot the PC.  The addin loads.  The addin was created by the visual studio wizard and the code is unchanged.  Why does an addin load even though the .addin file is marked as not to load?

    the addin file is in directory c:\users\steve\documens\visual studio 2010\addins

    here is the .addin file:

    <?

     

     

    xml version="1.0" encoding="UTF-16" standalone="no"?>

    <

     

     

    Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility">

    <

     

     

    HostApplication>

    <

     

     

    Name>Microsoft Visual Studio Macros</Name>

    <

     

     

    Version>10.0</Version>

    </

     

     

    HostApplication>

    <

     

     

    HostApplication>

    <

     

     

    Name>Microsoft Visual Studio</Name>

    <

     

     

    Version>10.0</Version>

    </

     

     

    HostApplication>

    <

     

     

    Addin>

    <

     

     

    FriendlyName>Addin6 - No Name provided.</FriendlyName>

    <

     

     

    Description>Addin6 - No Description provided.</Description>

    <

     

     

    Assembly>c:\src#\Addin6\Addin6\bin\Addin6.dll</Assembly>

    <

     

     

    FullClassName>Addin6.Connect</FullClassName>

    <

     

     

    LoadBehavior>0</LoadBehavior>

    <

     

     

    CommandPreload>0</CommandPreload>

    <

     

     

    CommandLineSafe>0</CommandLineSafe>

    </

     

     

    Addin>

    </

     

     

    Extensibility>

     

     

     

    Wednesday, June 23, 2010 10:55 PM

Answers

  • Hi SteveRichter,

    This issue is caused by opening another VS instance when you is debugging your Addin.

    When you create an add-in by using the Add-in Wizard and then run it, another instance of Visual Studio starts, allowing you to test and debug the resultant add-in. At same time, when you open a new VS instance, the Addin command will appear in the new opening VS instance. 

    I have not found a effective solution to solve this issue, but you can try to reset your Addin. About how to reset Addin, please refer to Carlos's blog:

    http://www.mztools.com/Articles/2006/MZ2006014.aspx

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Steve Richter Thursday, June 24, 2010 10:32 PM
    Thursday, June 24, 2010 10:29 AM

All replies

  • actually, the OnConnection method is not being called. But the button is on the tool bar.  When I click the button the Exec method runs. Totally confusing. If I start and stop visual studio enough times the button on the tool bar goes away.

     

    Wednesday, June 23, 2010 11:06 PM
  • Hi SteveRichter,

    check this link: HOWTO: Troubleshooting Visual Studio and Office add-ins

    Hope this helps to set your addin right!

    Regards,

    Nayna

    Thursday, June 24, 2010 9:08 AM
  • Hi SteveRichter,

    This issue is caused by opening another VS instance when you is debugging your Addin.

    When you create an add-in by using the Add-in Wizard and then run it, another instance of Visual Studio starts, allowing you to test and debug the resultant add-in. At same time, when you open a new VS instance, the Addin command will appear in the new opening VS instance. 

    I have not found a effective solution to solve this issue, but you can try to reset your Addin. About how to reset Addin, please refer to Carlos's blog:

    http://www.mztools.com/Articles/2006/MZ2006014.aspx

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Steve Richter Thursday, June 24, 2010 10:32 PM
    Thursday, June 24, 2010 10:29 AM