none
Change visual studio environment settings RRS feed

  • Question

  • Hai

    I've been trying to find a way of updating the settings by code (DTE) found at the visual studio environment:

     

    Tools.Options --> Environment.Documents

     

    and the only option was change the settings menually and then creating an export settings kit found at:

     

    Tools.Import And Export Settings...

     

    any one knows other options???

     

    Monday, October 29, 2007 6:49 PM

Answers

  • Hi Michael

     

    The following vs macro shows you how to access the properties through the dte

     

    Code Block

    Sub dteProperties()

    Dim props As Properties = DTE.Properties("Environment", "Documents")

    For Each prop As EnvDTE.Property In props

    Dim val As String = "NA"

    Try

    val = prop.Value.ToString()

    Catch ex As Exception

    End Try

    Debug.Print(String.Format("Name = {0} Value = {1}", prop.Name, val))

    Next

    End Sub

     

     

     

    Ole

     

    Wednesday, December 26, 2007 4:49 AM

All replies

  • The Visual Studio Extensibility forum is the right place to ask this question. I moved it to the correct forum.

     

    Tuesday, December 25, 2007 2:58 AM
  • Hi Michael

     

    The following vs macro shows you how to access the properties through the dte

     

    Code Block

    Sub dteProperties()

    Dim props As Properties = DTE.Properties("Environment", "Documents")

    For Each prop As EnvDTE.Property In props

    Dim val As String = "NA"

    Try

    val = prop.Value.ToString()

    Catch ex As Exception

    End Try

    Debug.Print(String.Format("Name = {0} Value = {1}", prop.Name, val))

    Next

    End Sub

     

     

     

    Ole

     

    Wednesday, December 26, 2007 4:49 AM