locked
How to write VS2012 package to import environment settings RRS feed

  • Question

  • Hi all,

    since VS2012 doesn't have macros, I would like to write package which could import environment settings. I looked briefly at SDK, but I didn't found how to execute the import setting command.

    Thanks in advance,

    Petr

    Monday, August 27, 2012 12:45 PM

Answers

  • I found the solution. Setting could be imported by this command:

    _applicationObject.ExecuteCommand("Tools.ImportandExportSettings", @"-import:""someSetting.vssettings""");

    • Marked as answer by Petr Altman Thursday, August 30, 2012 1:45 PM
    Thursday, August 30, 2012 1:45 PM

All replies

  • Hi Petr,

    Do you want to change the enviroment of Visual Studio such like the edit line color and highlight?

    Here is an example about Highlighting Text you can refer to:

    http://msdn.microsoft.com/en-us/library/dd885121.aspx

    If I missed your issue, please feel free to let us know.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, August 28, 2012 5:35 AM
  • Hi Ego,

    I would like to import window layout. I have multi monitor layout at work and I need to switch to single monitor layout when I connect via remote desktop from home.

    In VS2010 I saved window layout for multiple monitor and for single monitor and switching between them with a macro.

    Importing settings by menu command Tools/Import and Export settings is tedious task.

    Hope that make sense,

    Petr

    Tuesday, August 28, 2012 6:44 AM
  • Hi Petr,

    You can refer to http://msdn.microsoft.com/en-us/library/bb166500.aspx which is about how to export settings by using interop assemblies

    Best regards,

    Thursday, August 30, 2012 9:11 AM
  • I found the solution. Setting could be imported by this command:

    _applicationObject.ExecuteCommand("Tools.ImportandExportSettings", @"-import:""someSetting.vssettings""");

    • Marked as answer by Petr Altman Thursday, August 30, 2012 1:45 PM
    Thursday, August 30, 2012 1:45 PM
  • Hi Petr,

    I’m glad to hear that you got it working.

    Thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Friday, August 31, 2012 1:40 AM