Exception when using EnvDTE. How to fix?

  • Thread starter Thread starter Christina Androne
  • Start date Start date
C

Christina Androne

Hi

Has anybody encountered this:

EnvDTE.DTE env = new EnvDTE.DTE();

raises this exception:
{"COM object with CLSID {3C9CFE1E-389F-4118-9FAD-365385190329} is
either not valid or not registered." }
Cruising over the internet I have found out that this happends only
when the framework version is bigger that 1.0 (beta, v1.1). I am using
1.1.
Is there any method for getting rid of this issue?

Any help is greatly appreciated.

Christina Androne.
 
The guid 3C9CFE1E-389F-4118-9FAD-365385190329 refers to VSDTE7.0

try:

EnvDTE.DTE env = (EnvDTE.DTE)
System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.7.1
");
 
Yves said:
The guid 3C9CFE1E-389F-4118-9FAD-365385190329 refers to VSDTE7.0

try:

EnvDTE.DTE env = (EnvDTE.DTE)
System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.D
TE.7.1 ");

Thank you, I've found this in the MS docs just before reading your post
:-). Now I have another problem: I have to create a toolbox item and
add on it like 30 or more controls form the same dll. The problem is
that this opperation is incredibly slow (I understood the assembly is
loaded and freed for every added item), and we're trying to find a
faster solution. Do you (or anybody else for that matter) have any idea
on how to speed up the process?

TIA,
Christina Androne
 
Back
Top