I got the correct command when opening ITextView . This is an important reason, if ITextView does not open, it seems to me that the command simply fails. A faster way is to create a Margin Editor extension project (the VS SDK must be installed). In the EditorMargin class EditorMargin do the following:
[Import] private SVsServiceProvider _ServiceProvider; private DTE2 _DTE2; public EditorMargin1(IWpfTextView textView) {
Note: IWpfTextViewCreationListener should be enough if you do not want to create Margin. Learn about the MEF extensions to use it.
Now this parameter was probably controlled on the Tools → Options page until VS2010. Other parameters of this page can be controlled using DTE automation:
_DTE2.Properties["TextEditor", "General"].Item("DetectUTF8WithoutSignature").Value = true; _DTE2.Properties["Environment", "Documents"].Item("CheckLineEndingsOnLoad").Value = true;
ShellSettingsManager only refers to writing to the registry, there is no function for updating settings (if it exists, it would be inefficient, anyway, it would lead to a reboot of the entire collection of settings). The previous ones were what I was looking for. Solving your problem was a bonus :)
source share