locked
Custom settings lost after closing Visual Studio RRS feed

  • Question

  • I have developed an add-in for Visual Studio 2008 that registers/unregisters it's menu and tool box items on load/unload. Everything works fine as far as the add-in is concerned.

    I have a very wierd problem related to the custom settings in VS. I have customised certain settings like which toolbars I want to open by default and which buttons from the toolbar should be visible etc. Also the position of these toolbars is customized. When I close VS with my add-in loaded, and then restart VS - all my custom settings are reverted back to the default VS settings. The only thing I do while unloading the addin (in the IDTExtensibility2.OnDisconnection method implementation) is remove the menu and toolbox items.

    Why does this cause other ,completely unrelated VS settings to be affected?


    Any pointers would be highly appreciated.

    Thanks.

    Monday, August 16, 2010 3:22 PM

Answers

  • Do your other settings (non-addin, regular VS) behave the same way?  Are you running VS as an admin, and if not, does it help?  Also try to look for exception during the VS quit operation.


    Carl Brochu, Visual Studio
    • Proposed as answer by Victor_Chen Monday, August 23, 2010 7:27 AM
    • Marked as answer by Victor_Chen Tuesday, August 24, 2010 2:13 AM
    Tuesday, August 17, 2010 5:58 PM

All replies

  • Do your other settings (non-addin, regular VS) behave the same way?  Are you running VS as an admin, and if not, does it help?  Also try to look for exception during the VS quit operation.


    Carl Brochu, Visual Studio
    • Proposed as answer by Victor_Chen Monday, August 23, 2010 7:27 AM
    • Marked as answer by Victor_Chen Tuesday, August 24, 2010 2:13 AM
    Tuesday, August 17, 2010 5:58 PM
  • I'm actually using the addin in question.

    Do your other settings (non-addin, regular VS) behave the same way?
    I'm not sure I understand what you mean. It's non-addin related values that are lost/corrupted. Thinks like the active toolbars and the buttons on them.

    Are you running VS as an admin
    I'm the admin user on this box, yes.

    Also try to look for exception during the VS quit operation.
    That's something for the developer, but I can tell you that nothing is reported in the IDE.


    Tuesday, August 17, 2010 6:07 PM
  • Hi Audipen,

     

    Thanks for your post.

    I suppose your problem is when the VS IDE restarted and the add-in not loaded yet, the VS settings reset to default, but when you load your add-in, the settings set as you expected again.

    But your expected situation is when the VS IDE restarted, it just removes some menu and items and remains other settings. Right?

    In my situation, if I add some menus and toolbars manually, and restart VS IDE, it keeps there.

    Could you show me some of your code? Would you please check there is no reset behavior in your method?

    And also you can debug your IDE with experimental hive, find out when the IDE reseted.

     P.S. Just as CarlBrochu said, you can run the VS as admin and try again, it's different even if your user account is administrator.

    Best Regards,

    Ziwei Chen

     

    Wednesday, August 18, 2010 3:35 AM