You saw this: DTE2 events do not fire
You must save the local instance of the Events object, otherwise the event will not fire (I assume that the COM-enabled COM object went out of scope and was GC'd):
public class MyVSPackage { TextEditorEvents _textEditorEvents; public MyVSPackage() { _textEditorEvents = DTE.Events.TextEditorEvents; _textEditorEvents.LineChanged += (point, endPoint, hint) =>
source share