Created
June 4, 2009 16:14
-
-
Save PProvost/123691 to your computer and use it in GitHub Desktop.
A little hack to acces DTE without having an IServiceProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global::EnvDTE.DTE dte = Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(global::EnvDTE.DTE)) as global::EnvDTE.DTE; | |
global::EnvDTE.ProjectItem item = dte.Solution.FindProjectItem(relativeToPathName); | |
global::EnvDTE.Project project = item.ContainingProject; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment