COM object with CLSID {...} is either not valid or n

fadi

Well-known member
Joined
Jul 4, 2003
Messages
209
Location
Lebanon
hello all, i used to work with vs.net 2002 and now i upgraded to vs.net 2003. i had a solution which used the envdte com class.the project was working just fine. when i upgraded, it started giving me this error whenever i instantiated a new solution object (envdte is used to create and edit solution)
thanks alot
 
the complete error is
An unhandled exception of type System.Runtime.InteropServices.COMException occurred in WindowsApplication1.exe

Additional information: COM object with CLSID {B35CAA8C-77DE-4AB3-8E5A-F038E3FC6056} is either not valid or not registered.
 
ok i found the solution, for those interested i used to instantiate a new solution using the normal method:
Dim mydte As New EnvDTE.Solution
this way doesnt work anymore in .net 1.1
the new way is:

Dim t As System.Type = System.Type.GetTypeFromProgID("VisualStudio.Solution.7.1")
Dim obj As Object = System.Activator.CreateInstance(t, True)

Dim mydte As EnvDTE.Solution = CType(obj, EnvDTE.Solution)

weird isnt it...........
 
Back
Top