I tried this:
dte = (DTE)GetGlobalService(typeof(DTE));
dte.Events.DocumentEvents.DocumentOpening += DocumentEvents_DocumentOpening;in Initialize() method of VSPackage.
But it doesn't work when a document is opened. My EventHandler not execute.
Other events like CommandEvents/SolutionEvents also not work.
Is something wrong in my code ?
thanks.