diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/DTE.cs b/src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/DTE.cs index 0176cbecc6..aac404c3f6 100644 --- a/src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/DTE.cs +++ b/src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/DTE.cs @@ -5,11 +5,13 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; + +using Microsoft.VisualStudio.Shell; using SD = ICSharpCode.SharpDevelop.Project; namespace ICSharpCode.PackageManagement.EnvDTE { - public class DTE : MarshalByRefObject, global::EnvDTE.DTE + public class DTE : MarshalByRefObject, global::EnvDTE.DTE, IServiceProvider { IPackageManagementProjectService projectService; IPackageManagementFileService fileService; @@ -83,5 +85,14 @@ namespace ICSharpCode.PackageManagement.EnvDTE public global::EnvDTE.SourceControl SourceControl { get { return null; } } + + /// + /// HACK - EnvDTE.DTE actually implements Microsoft.VisualStudio.OLE.Interop.IServiceProvider + /// which is COM specific and has a QueryInterface method. + /// + object IServiceProvider.GetService(Type serviceType) + { + return Package.GetGlobalService(serviceType); + } } }