I'm trying to use EnvDTE to change a Visual Studio option.
The EnvDTE object exposes the Properties collection to do this, and for example, to access the options exposed in the VS configuration dialog under Text Editor -> XML, one has to use Properties("TextEditor", "XML")
.
This can be easily tested using PowerShell from the NuGet console, which exposes a $dte
variable, for example this will show line numbers in XML files:
$dte.Properties("TextEditor", "XML").Item("ShowLineNumbers").Value = $true
My problem is that I cannot find where are the options listed in the submenu Text Editor -> XML -> Formatting. I tried
$dte.Properties("TextEditor", "XML - Formatting")
after looking at this example, but it does not work.