How to obtain a reference to the Visual Studio shell Follow
Hi
How do I obtain a reference to the Visual Studio shell in ReSharper 6.
In Resharper 5, I could use:
_DTE dte = IVsServiceProviderEx.Dte(VSShell.Instance.ServiceProvider);
Thanks
--Jakob
Please sign in to leave a comment.
Did you find out how to do it? I am trying to do the same thing for Resharper 7.
Viktar
For future reference, you can get the DTE instance by calling Shell.Instance.GetComponent<DTE>(). Action handlers don't allow constructor injection. See http://devnet.jetbrains.net/message/5468261#5468261 for more detail.
Thanks
Matt