How to obtain a reference to the Visual Studio shell

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

2 comments
Comment actions Permalink

Did you find out how to do it? I am trying to do the same thing for Resharper 7.

Viktar

0
Comment actions Permalink

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

0

Please sign in to leave a comment.