I don?t think there is another way apart from calling CreateInstance with
"VisualStudio.DTE.7.1" as you are doing, but I think it should not be so
slow, what kind of operations are you trying to do?

Signature
Carlos J. Quintero (Visual Developer - .NET MVP)
The MZ-Tools all-in-one add-in, now for .NET: http://www.mztools.com
> Hi All -
> Does anyone know of a way to create a DTE object programmatically without
[quoted text clipped - 3 lines]
>
> oDTE =
CType(System.Activator.CreateInstance(System.Type.GetTypeFromProgID("VisualS
> tudio.DTE.7.1"), True), EnvDTE.DTE)
>
> Any ideas?
>
> TIA -
> Dan
Dan - 22 Oct 2004 14:05 GMT
The operations span pretty much the entire EnvDTE namespace, including
extensive use of CodeElements and EditPoints. Each individual reference to
the DTE object isn't slow, but I'm doing hundreds of thousands (perhaps
millions) of them. An operation that takes 2 minutes when run from an addin
takes an hour when run through automation (cross process reference). The
not-in-process thing is all I can think of that would be destroying the
performance.
Dan
> I don?t think there is another way apart from calling CreateInstance with
> "VisualStudio.DTE.7.1" as you are doing, but I think it should not be so
[quoted text clipped - 7 lines]
> >
> > oDTE =
CType(System.Activator.CreateInstance(System.Type.GetTypeFromProgID("VisualS
> > tudio.DTE.7.1"), True), EnvDTE.DTE)
> >
> > Any ideas?
> >
> > TIA -
> > Dan